[FFmpeg-cvslog] lavf/find_stream_info: make sure we decode at least one frame for DTS
Michael Niedermayer
git at videolan.org
Sun Sep 23 05:46:40 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 23 04:56:51 2012 +0200| [21c4393f1ca2214e466a12b45c234e0494fa1633] | committer: Michael Niedermayer
lavf/find_stream_info: make sure we decode at least one frame for DTS
The channel layout at the demuxer layer is commonly wrong and would
otherwise be used.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21c4393f1ca2214e466a12b45c234e0494fa1633
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0732c46..6603483 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2314,6 +2314,8 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
FAIL("unspecified sample rate");
if (!avctx->channels)
FAIL("unspecified number of channels");
+ if (st->info->found_decoder >= 0 && !st->nb_decoded_frames && avctx->codec_id == AV_CODEC_ID_DTS)
+ FAIL("no decodable DTS frames");
break;
case AVMEDIA_TYPE_VIDEO:
if (!avctx->width)
More information about the ffmpeg-cvslog
mailing list