# HG changeset patch # User jbr # Date 1233539620 0 # Node ID 329e332e829f1ae53875937b36a91254599dca43 # Parent 0d2190f5ae78dd457843122465cc65e50e33eda7 flacdec: set default sample_fmt before parsing extradata diff -r 0d2190f5ae78 -r 329e332e829f flacdec.c --- 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; }