summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2014-10-28 13:33:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-10-28 18:59:16 +0100
commit1b17b64ee4d6d7070e0ef3ab312e5f81f45dad49 (patch)
tree84a7e59f0fc7aa103859d9162f8b97bb94e40d86 /libavformat/mxfdec.c
parent37c36861550f2a30f5bc6b9a4b18d34cb75da460 (diff)
Revert "avformat/mxfdec: detect loops during header parsing"
This reverts commit 1c010fd035c1a14dc73827b84f21f593e969a5d6. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 5c9d808d80..ef4b36824e 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)