changeset 8728:329e332e829f libavcodec

flacdec: set default sample_fmt before parsing extradata
author jbr
date Mon, 02 Feb 2009 01:53:40 +0000
parents 0d2190f5ae78
children 9d25a95ca2c0
files flacdec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;
 }