From 662adc4db39b1925c90fc78fb83d58c0e3e6dfd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <tomas.har...@codemill.se>
Date: Tue, 28 Oct 2014 13:33:47 +0100
Subject: [PATCH 3/5] Revert "avformat/mxfdec: detect loops during header
 parsing"

This reverts commit 1c010fd035c1a14dc73827b84f21f593e969a5d6.
---
 libavformat/mxfdec.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 5c9d808..ef4b368 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2294,8 +2294,6 @@ static int mxf_read_header(AVFormatContext *s)
     MXFContext *mxf = s->priv_data;
     KLVPacket klv;
     int64_t essence_offset = 0;
-    int64_t last_pos = -1;
-    uint64_t last_pos_index = 1;
     int ret;
 
     mxf->last_forward_tell = INT64_MAX;
@@ -2313,12 +2311,7 @@ static int mxf_read_header(AVFormatContext *s)
 
     while (!avio_feof(s->pb)) {
         const MXFMetadataReadTableEntry *metadata;
-        if (avio_tell(s->pb) == last_pos) {
-            av_log(mxf->fc, AV_LOG_ERROR, "MXF structure loop detected\n");
-            return AVERROR_INVALIDDATA;
-        }
-        if ((1ULL<<61) % last_pos_index++ == 0)
-            last_pos = avio_tell(s->pb);
+
         if (klv_read_packet(&klv, s->pb) < 0) {
             /* EOF - seek to previous partition or stop */
             if(mxf_parse_handle_partition_or_eof(mxf) <= 0)
-- 
1.9.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to