aboutsummaryrefslogtreecommitdiffstats
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 09:15:18 +0100
commit1456ed2dd55e0ceece13dbca98d8189513ae25b5 (patch)
tree71c65cf8bff576c06ca8b273a49d2ded11194f32
parent79c9d9b1343284007babe5db4f62ed3847408bcf (diff)
downloadffmpeg-1456ed2dd55e0ceece13dbca98d8189513ae25b5.tar.gz
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 ticket #4307. (cherry picked from commit 2e0b5f5c90a4bc1440703ba5e8bf7139ff42f367) Conflicts: libavformat/riff.c
-rw-r--r--libavformat/avidec.c7
-rw-r--r--libavformat/riff.c1
2 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 78a6deae7d..032731dc4d 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
@@ -771,6 +772,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;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 8d7b1c2c61..c63e406be4 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -362,7 +362,6 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ AV_CODEC_ID_G2M, MKTAG('G', '2', 'M', '4') },
{ AV_CODEC_ID_G2M, MKTAG('G', '2', 'M', '5') },
{ AV_CODEC_ID_FIC, MKTAG('F', 'I', 'C', 'V') },
- { AV_CODEC_ID_PRORES, MKTAG('A', 'P', 'C', 'N') },
{ AV_CODEC_ID_NONE, 0 }
};