aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-29 06:26:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-19 20:57:25 +0200
commit52242a387b36fc05bf5fa65c4905927543b43ba7 (patch)
tree89601ecafc219a2701da969d6cfd3786df04f211
parent74b856e58bd91a626f2212e323f7e9bb27846966 (diff)
downloadffmpeg-52242a387b36fc05bf5fa65c4905927543b43ba7.tar.gz
avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Fixes Detecting AAC with such descriptor if the parts needed for detection are later in the stream Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 14e9a20083c9c17c9431754bf13e458293c1ead4) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3aa616a54a..455615ff2b 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1555,7 +1555,9 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
case 0x1F: /* FMC descriptor */
get16(pp, desc_end);
if (mp4_descr_count > 0 &&
- (st->codec->codec_id == AV_CODEC_ID_AAC_LATM || st->request_probe > 0) &&
+ (st->codec->codec_id == AV_CODEC_ID_AAC_LATM ||
+ (st->request_probe == 0 && st->codec->codec_id == AV_CODEC_ID_NONE) ||
+ st->request_probe > 0) &&
mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {
AVIOContext pb;
ffio_init_context(&pb, mp4_descr->dec_config_descr,