[FFmpeg-devel] [PATCH]Do not list mov codecs in riff.c
wm4
nfxjfg at googlemail.com
Fri Mar 13 10:11:47 CET 2015
On Fri, 13 Mar 2015 02:46:32 +0100
Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index 5c9443a..00f0037 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");
> + }
Nice warning, but why do we accept this in the first place? This looks
so very wrong.
> /* 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 399523c..696b06b 100644
> --- a/libavformat/riff.c
> +++ b/libavformat/riff.c
> @@ -362,9 +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_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_NONE, 0 }
> };
More information about the ffmpeg-devel
mailing list