summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-03-16 11:58:29 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-03-17 13:34:22 +0000
commit4326bc364b58e97fc3d89417054a6b7610179a00 (patch)
treeec7d718c2715953ee6b570016e590d346fe06da2 /libavformat/avidec.c
parentcf9861dea5d42d0b5a6cf0609b9624525d96c1e0 (diff)
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@gmail.com>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 20dc6e1525..5c52104e87 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;