[FFmpeg-devel] [PATCH]Support broken prores in mkv

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Apr 1 09:19:36 CEST 2014


Hi!

Attached are two patches that allow decoding broken 
mkv files containing prores video.
See also ticket #3434.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4390b6b..2282af6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1760,6 +1760,9 @@ static int matroska_read_header(AVFormatContext *s)
             fourcc              = AV_RL32(track->codec_priv.data + 16);
             codec_id            = ff_codec_get_id(ff_codec_bmp_tags,
                                                   fourcc);
+            if (!codec_id)
+                codec_id        = ff_codec_get_id(ff_codec_movvideo_tags,
+                                                  fourcc);
             extradata_offset    = 40;
         } else if (!strcmp(track->codec_id, "A_MS/ACM") &&
                    track->codec_priv.size >= 14         &&
-------------- next part --------------
diff --git a/libavformat/riff.c b/libavformat/riff.c
index fc23da6..e9a1f26 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -359,6 +359,11 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_G2M,          MKTAG('G', '2', 'M', '3') },
     { AV_CODEC_ID_G2M,          MKTAG('G', '2', 'M', '4') },
     { AV_CODEC_ID_FIC,          MKTAG('F', 'I', 'C', 'V') },
+    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', 'C', 'H') },
+    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', 'C', 'N') },
+    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', 'C', 'S') },
+    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', 'C', 'O') },
+    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', '4', 'H') },
     { AV_CODEC_ID_NONE,         0 }
 };
 


More information about the ffmpeg-devel mailing list