Mercurial > libavcodec.hg
diff flacdec.c @ 8728:329e332e829f libavcodec
flacdec: set default sample_fmt before parsing extradata
author | jbr |
---|---|
date | Mon, 02 Feb 2009 01:53:40 +0000 |
parents | e9d9d946f213 |
children | 49817775b44f |
line wrap: on
line diff
--- a/flacdec.c Mon Feb 02 00:35:25 2009 +0000 +++ b/flacdec.c Mon Feb 02 01:53:40 2009 +0000 @@ -103,6 +103,8 @@ 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 @@ } } - avctx->sample_fmt = SAMPLE_FMT_S16; return 0; }