[FFmpeg-devel] [PATCH] avcodec/dca: set initial sample_fmt to FLTP

foo86 foobaz86 at gmail.com
Sat Dec 24 20:19:17 EET 2016


Fixes regression introduced in 39f7620d76c7a133535ed7a535f7a74fefa6e435.

Not setting default sample_fmt can result in failed transcode when audio
stream starts later in a file.

Set initial sample_fmt to FLTP, which is the "baseline" format decoder
produces.

Fixes ticket #5998.
---
 libavcodec/dcadec.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 }
 
-- 
2.11.0



More information about the ffmpeg-devel mailing list