From 0f5ec05d8f4ae02262dc79a895bce3b465b376f2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 23 Nov 2013 21:22:17 +0100 Subject: audio: move decoder context from sh_audio into new struct Move all state that basically changes during decoding or is needed in order to manage decoding itself into a new struct (dec_audio). sh_audio (defined in stheader.h) is supposed to be the audio stream header. This should reflect the file headers for the stream. Putting the decoder context there is strange design, to say the least. --- demux/stheader.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'demux') diff --git a/demux/stheader.h b/demux/stheader.h index c88ed0b0f7..ab190cca83 100644 --- a/demux/stheader.h +++ b/demux/stheader.h @@ -92,16 +92,11 @@ typedef struct sh_audio { int samplerate; struct mp_chmap channels; int i_bps; // == bitrate (compressed bytes/sec) - // decoder state: - struct mp_audio_buffer *decode_buffer; - struct af_stream *afilter; // the audio filter stream - const struct ad_functions *ad_driver; // win32-compatible codec parameters: MP_WAVEFORMATEX *wf; // note codec extradata may be either under "wf" or "codecdata" unsigned char *codecdata; int codecdata_len; - int pts_offset; // number of samples output by decoder after last known pts } sh_audio_t; typedef struct sh_video { -- cgit v1.2.3