[FFmpeg-cvslog] adts: Fix PCE copying.

Alex Converse git at videolan.org
Thu Sep 22 01:17:21 CEST 2011


ffmpeg | branch: release/0.8 | Alex Converse <alex.converse at gmail.com> | Wed Jun 29 13:41:47 2011 -0700| [baec70e16fd98c72a7ec9eaec70453a9279ad46c] | committer: Anton Khirnov

adts: Fix PCE copying.

Parse the extension flag bit when reading the MPEG4 AudioSpecificConfig.

This has nothing to do with SBR/PS contradictory to what was noted when it was removed.
(cherry picked from commit 7f01a4192cdf4565eadee457f76e6b5196e35e0b)

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavformat/adtsenc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index e858a81..75649e2 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -59,6 +59,10 @@ int ff_adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, uint8_t *buf
         av_log(s, AV_LOG_ERROR, "Scalable configurations are not allowed in ADTS\n");
         return -1;
     }
+    if (get_bits(&gb, 1)) {
+        av_log(s, AV_LOG_ERROR, "Extension flag is not allowed in ADTS\n");
+        return -1;
+    }
     if (!adts->channel_conf) {
         init_put_bits(&pb, adts->pce_data, MAX_PCE_SIZE);
 



More information about the ffmpeg-cvslog mailing list