summaryrefslogtreecommitdiffstats
path: root/audio/decode/dec_audio.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-23 21:25:05 +0100
committerwm4 <wm4@nowhere>2013-11-23 21:25:05 +0100
commite174d31fdda78374600878699ef911fd09f55a26 (patch)
tree63cd9b7023e1a198dbbea097887a16a793f2f9b5 /audio/decode/dec_audio.h
parent0f5ec05d8f4ae02262dc79a895bce3b465b376f2 (diff)
downloadmpv-e174d31fdda78374600878699ef911fd09f55a26.tar.bz2
mpv-e174d31fdda78374600878699ef911fd09f55a26.tar.xz
audio: don't write decoded audio format to sh_audio
sh_audio is supposed to contain file headers, not whatever was decoded. Fix this, and write the decoded format to separate fields in the decoder context, the dec_audio.decoded field. (Note that this field is really only needed to communicate the audio format from decoder driver to the generic code, so no other code accesses it.)
Diffstat (limited to 'audio/decode/dec_audio.h')
-rw-r--r--audio/decode/dec_audio.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h
index bc5c3793d8..be5fc44dfc 100644
--- a/audio/decode/dec_audio.h
+++ b/audio/decode/dec_audio.h
@@ -20,6 +20,7 @@
#define MPLAYER_DEC_AUDIO_H
#include "audio/chmap.h"
+#include "audio/audio.h"
#include "demux/stheader.h"
struct mp_audio_buffer;
@@ -34,7 +35,10 @@ struct dec_audio {
int initialized;
char *decoder_desc;
// set by decoder
- int i_bps; // input bitrate
+ struct mp_audio decoded; // format of decoded audio (no data, temporarily
+ // different from decode_buffer during format
+ // changes)
+ int i_bps; // input bitrate, can change with VBR sources
// last known pts value in output from decoder
double pts;
// number of samples output by decoder after last known pts