[FFmpeg-cvslog] avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Michael Niedermayer
git at videolan.org
Mon Jun 1 12:46:44 CEST 2015
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 29 06:26:18 2015 +0200| [c0d6afa3e617c8d5b24d0a98688314edc9bfbbcc] | committer: Michael Niedermayer
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 at gmx.at>
(cherry picked from commit 14e9a20083c9c17c9431754bf13e458293c1ead4)
Conflicts:
libavformat/mpegts.c
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0d6afa3e617c8d5b24d0a98688314edc9bfbbcc
---
libavformat/mpegts.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3f06c57..71a4549 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1459,8 +1459,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
}
break;
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) &&
+ if (get16(pp, desc_end) < 0)
+ break;
+ 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_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,
More information about the ffmpeg-cvslog
mailing list