projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bf959f
)
flacdec: set default sample_fmt before parsing extradata
author
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 2 Feb 2009 01:53:40 +0000
(
01:53
+0000)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Mon, 2 Feb 2009 01:53:40 +0000
(
01:53
+0000)
Originally committed as revision 16926 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/flacdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/flacdec.c
b/libavcodec/flacdec.c
index
49b4577
..
d8ba07b
100644
(file)
--- 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;
}