summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-23 04:56:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-23 04:56:51 +0200
commit21c4393f1ca2214e466a12b45c234e0494fa1633 (patch)
tree059bc4ce6b9e2c19f6aff8e93b70ee6cd880eece /libavformat
parent61a84755a9602f315508cc6d2916ebd30e331d28 (diff)
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@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0732c46177..6603483e64 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)