Message ID | 20161224181917.20315-1-foobaz86@gmail.com |
---|---|
State | New |
Headers | show |
Am 24.12.2016 21:17 schrieb "foo86" <foobaz86@gmail.com>: Fixes regression introduced in 39f7620d76c7a133535ed7a535f7a74fefa6e435. Not setting default sample_fmt can result in failed transcode when audio stream starts later in a file. I don't agree with this. Letting decoders set their output format based on stream data is standard behavior and we have options to increase to probe size and analyze duration to accommodate badly muxed files. Having the wrong sample format can result in different awkwardness, instead of waiting until we have a correct one, especially with recent approaches to limit stream parsing as much as possible, where it might not even try to fix it anymore during probing. Maybe FFmpeg should be fixed to just assume whatever standard sample format if none is set and insert a converter if needed then. - Hendrik
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 4146a85ec5..f772406691 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -362,6 +362,8 @@ static av_cold int dcadec_init(AVCodecContext *avctx) break; } + avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; + return 0; }