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>
release/1.0
Michael Niedermayer 13 years ago
parent 61a84755a9
commit 21c4393f1c
  1. 2
      libavformat/utils.c

@ -2314,6 +2314,8 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
FAIL("unspecified sample rate"); FAIL("unspecified sample rate");
if (!avctx->channels) if (!avctx->channels)
FAIL("unspecified number of 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; break;
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
if (!avctx->width) if (!avctx->width)

Loading…
Cancel
Save