[FFmpeg-cvslog] lavf: Do not list mov-only codecs in riff tags

Carl Eugen Hoyos git at videolan.org
Tue Mar 17 21:18:57 CET 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon Mar 16 11:58:29 2015 +0000| [4326bc364b58e97fc3d89417054a6b7610179a00] | committer: Vittorio Giovara

lavf: Do not list mov-only codecs in riff tags

Instead check for all mov code-points when demuxing avi
and print a warning if a video codec is found like this.

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4326bc364b58e97fc3d89417054a6b7610179a00
---

 libavformat/Makefile |    2 +-
 libavformat/avidec.c |   12 ++++++++++++
 libavformat/riff.c   |    3 ---
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/libavformat/Makefile b/libavformat/Makefile
index d60404b..73b9f63 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -78,7 +78,7 @@ OBJS-$(CONFIG_ASS_DEMUXER)               += assdec.o
 OBJS-$(CONFIG_ASS_MUXER)                 += assenc.o
 OBJS-$(CONFIG_AU_DEMUXER)                += au.o pcm.o
 OBJS-$(CONFIG_AU_MUXER)                  += au.o rawenc.o
-OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o
+OBJS-$(CONFIG_AVI_DEMUXER)               += avidec.o isom.o
 OBJS-$(CONFIG_AVI_MUXER)                 += avienc.o
 OBJS-$(CONFIG_AVISYNTH)                  += avisynth.o
 OBJS-$(CONFIG_AVM2_MUXER)                += swfenc.o swf.o
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 20dc6e1..5c52104 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -31,6 +31,7 @@
 #include "avi.h"
 #include "dv.h"
 #include "internal.h"
+#include "isom.h"
 #include "riff.h"
 
 #undef NDEBUG
@@ -648,6 +649,17 @@ static int avi_read_header(AVFormatContext *s)
                     st->codec->codec_tag  = tag1;
                     st->codec->codec_id   = ff_codec_get_id(ff_codec_bmp_tags,
                                                             tag1);
+                    /* If codec is not found yet, try with the mov tags. */
+                    if (!st->codec->codec_id) {
+                        char tag_buf[32];
+                        av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag1);
+                        st->codec->codec_id =
+                            ff_codec_get_id(ff_codec_movvideo_tags, tag1);
+                        if (st->codec->codec_id)
+                           av_log(s, AV_LOG_WARNING,
+                                  "mov tag found in avi (fourcc %s)\n",
+                                  tag_buf);
+                    }
                     /* This is needed to get the pict type which is necessary
                      * for generating correct pts. */
                     st->need_parsing = AVSTREAM_PARSE_HEADERS;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 02588bc..2a46975 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -349,9 +349,6 @@ 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', 'N') },
-    { AV_CODEC_ID_PRORES,       MKTAG('A', 'P', 'C', 'H') },
-    { AV_CODEC_ID_QTRLE,        MKTAG('r', 'l', 'e', ' ') },
     { AV_CODEC_ID_HQX,          MKTAG('C', 'H', 'Q', 'X') },
     { AV_CODEC_ID_TDSC,         MKTAG('T', 'D', 'S', 'C') },
     { AV_CODEC_ID_NONE,         0 }



More information about the ffmpeg-cvslog mailing list