[FFmpeg-devel] [PATCH] mxfdec: respect AVFMT_FLAG_IGNIDX.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Dec 16 21:01:46 CET 2011


This is useful if either the index is just broken or as a
temporary workaround if the new index parsing code doesn't
handle some case yet.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavformat/mxfdec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 17eadbf..6dced72 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -438,7 +438,9 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     /* TODO: better logic for this?
      * only files that lack all index segments prior to the essence need this */
-    if (!s->pb->seekable && mxf->op != OPAtom || mxf->d10 || mxf->broken_index)
+    if ((s->flags & AVFMT_FLAG_IGNIDX) ||
+        !s->pb->seekable && mxf->op != OPAtom ||
+        mxf->d10 || mxf->broken_index)
         return mxf_read_packet_old(s, pkt);
 
     if (mxf->current_stream >= s->nb_streams) {
-- 
1.7.7.3



More information about the ffmpeg-devel mailing list