mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-13 18:55:08 +00:00
flacdec: set default sample_fmt before parsing extradata
Originally committed as revision 16926 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6bf959fee5
commit
faeb2bd41d
@ -103,6 +103,8 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
|
|||||||
FLACContext *s = avctx->priv_data;
|
FLACContext *s = avctx->priv_data;
|
||||||
s->avctx = avctx;
|
s->avctx = avctx;
|
||||||
|
|
||||||
|
avctx->sample_fmt = SAMPLE_FMT_S16;
|
||||||
|
|
||||||
if (avctx->extradata_size > 4) {
|
if (avctx->extradata_size > 4) {
|
||||||
/* initialize based on the demuxer-supplied streamdata header */
|
/* initialize based on the demuxer-supplied streamdata header */
|
||||||
if (avctx->extradata_size == FLAC_STREAMINFO_SIZE) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user