diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-02-02 01:53:40 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-02-02 01:53:40 +0000 |
commit | faeb2bd41d76c41542724a44efd4a20c85aae7c9 (patch) | |
tree | d00d72eb97f83b1432649332b907dbd007b2629e /libavcodec | |
parent | 6bf959fee5a53709b40fa940cf9fef32f07eb666 (diff) | |
download | ffmpeg-faeb2bd41d76c41542724a44efd4a20c85aae7c9.tar.gz |
flacdec: set default sample_fmt before parsing extradata
Originally committed as revision 16926 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/flacdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 49b45779e4..d8ba07bc1d 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -103,6 +103,8 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) FLACContext *s = avctx->priv_data; s->avctx = avctx; + avctx->sample_fmt = SAMPLE_FMT_S16; + if (avctx->extradata_size > 4) { /* initialize based on the demuxer-supplied streamdata header */ if (avctx->extradata_size == FLAC_STREAMINFO_SIZE) { @@ -115,7 +117,6 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) } } - avctx->sample_fmt = SAMPLE_FMT_S16; return 0; } |