From c643ba81283d44618df2ec675e2b8deea73825ca Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 27 Oct 2011 21:22:31 +0200 Subject: [PATCH] mpegts: Fix detection of some raw AAC Fixes Ticket577 Signed-off-by: Michael Niedermayer --- libavformat/mpegts.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8c01261168..f193b0f3a7 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -961,15 +961,17 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type switch(desc_tag) { case 0x1F: /* FMC descriptor */ get16(pp, desc_end); - if (st->codec->codec_id == CODEC_ID_AAC_LATM && + if ((st->codec->codec_id == CODEC_ID_AAC_LATM || st->request_probe>0) && mp4_dec_config_descr_len && mp4_es_id == pid) { AVIOContext pb; ffio_init_context(&pb, mp4_dec_config_descr, mp4_dec_config_descr_len, 0, NULL, NULL, NULL, NULL); ff_mp4_read_dec_config_descr(fc, st, &pb); if (st->codec->codec_id == CODEC_ID_AAC && - st->codec->extradata_size > 0) - st->need_parsing = 0; + st->codec->extradata_size > 0){ + st->request_probe= st->need_parsing = 0; + st->codec->codec_type= AVMEDIA_TYPE_AUDIO; + } } break; case 0x56: /* DVB teletext descriptor */