[FFmpeg-devel] [PATCH 2/3] id3v2: skip encrypted/compressed frames

Anton Khirnov anton
Mon Dec 6 09:33:08 CET 2010


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

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 4115f8f..2af1b03 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -229,7 +229,10 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
             tlen -= 4;
         }
 
-        if (tag[0] == 'T') {
+        if (tflags & (ID3v2_FLAG_ENCRYPTION | ID3v2_FLAG_COMPRESSION)) {
+            av_log(s, AV_LOG_WARNING, "Skipping encrypted/compressed ID3v2 frame %s.\n", tag);
+            url_fskip(s->pb, tlen);
+        } else if (tag[0] == 'T') {
             if (unsync || tunsync) {
                 int i, j;
                 av_fast_malloc(&buffer, &buffer_size, tlen);
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list