summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-03-13 08:49:03 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-03-13 08:49:03 +0100
commit2e0b5f5c90a4bc1440703ba5e8bf7139ff42f367 (patch)
tree637eac58331484aa794caef06a01f5c9ac5ee34a /libavformat/avidec.c
parenta47c2a1d5f9f25b43f302bbf86dee3dc7b2e78e4 (diff)
lavf: Do not list mov-only codecs in riff.c.
Instead check for all mov code-points when demuxing avi and print a warning if a video codec is found like this. Fixes a regression similar to the one described in ticket #4307.
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 5c9443a4f4..00f0037855 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -36,6 +36,7 @@
#include "riff.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/exif.h"
+#include "libavformat/isom.h"
typedef struct AVIStream {
int64_t frame_offset; /* current frame (video) or byte (audio) counter
@@ -773,6 +774,12 @@ 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 (!st->codec->codec_id) {
+ 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\n");
+ }
/* This is needed to get the pict type which is necessary
* for generating correct pts. */
st->need_parsing = AVSTREAM_PARSE_HEADERS;