[FFmpeg-devel] [RFC]lavf/mxfdec: Assume first track if track number is unknown

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Mar 10 15:06:29 CET 2016


Hi!

Attached patch fixes ticket #5312 here.
The OP claims that the file plays fine with Mainconcept softare, 
afaict the track number of the video track in the mxf header 
(0x15010800) does not match the track number of the video frames 
(0x15010500 == 352388352).

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 4dede6f..8d4f6a4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2965,9 +2965,9 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
 
             if (index < 0) {
                 av_log(s, AV_LOG_ERROR,
-                       "error getting stream index %"PRIu32"\n",
+                       "error getting stream index %"PRIu32", using stream 0\n",
                        AV_RB32(klv.key + 12));
-                goto skip;
+                index = 0;
             }
 
             st = s->streams[index];


More information about the ffmpeg-devel mailing list