[FFmpeg-cvslog] mpegts: Fix detection of some raw AAC

Michael Niedermayer git at videolan.org
Thu Oct 27 21:52:51 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 27 21:22:31 2011 +0200| [c643ba81283d44618df2ec675e2b8deea73825ca] | committer: Michael Niedermayer

mpegts: Fix detection of some raw AAC
Fixes Ticket577

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c643ba81283d44618df2ec675e2b8deea73825ca
---

 libavformat/mpegts.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 8c01261..f193b0f 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 */



More information about the ffmpeg-cvslog mailing list