mxfdec: Only parse next partition pack if parsing forward
authorTomas Härdin <tomas.hardin@codemill.se>
Tue, 20 Mar 2012 10:03:48 +0000 (11:03 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 21 Mar 2012 12:25:59 +0000 (13:25 +0100)
This fixes ticket #1099.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 393b81f0934866bd7fff0a2b113623dd9ee6808f)

libavformat/mxfdec.c

index cb38e5c..f63cff9 100644 (file)
@@ -1725,6 +1725,9 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap)
             /* next partition pack - keep going, seek to previous partition or stop */
             if(mxf_parse_handle_partition_or_eof(mxf) <= 0)
                 break;
+            else if (mxf->parsing_backward)
+                continue;
+            /* we're still parsing forward. proceed to parsing this partition pack */
         }
 
         for (metadata = mxf_metadata_read_table; metadata->read; metadata++) {