aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-14 12:43:33 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-14 13:02:30 +0100
commite2fb12b629e8c5a2a21c7bbd3260e3d316adeef1 (patch)
treeea8dd3a9f9a90a768dc5c59e4b4e79da33fcc217
parentad1549aec3ea826a61637557701acde9d4fc0541 (diff)
downloadffmpeg-e2fb12b629e8c5a2a21c7bbd3260e3d316adeef1.tar.gz
avformat/matroskaenc: fix handling of VFW style raw rgb
raw rgb uses 0 as codec tag in "VFW", the code assumed 0 means error Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskaenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index dabfd86264..810a60806e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -665,7 +665,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb,
if (!codec->codec_tag)
codec->codec_tag = ff_codec_get_tag(ff_codec_bmp_tags,
codec->codec_id);
- if (!codec->codec_tag) {
+ if (!codec->codec_tag && codec->codec_id != AV_CODEC_ID_RAWVIDEO) {
av_log(s, AV_LOG_ERROR, "No bmp codec tag found for codec %s\n",
avcodec_get_name(codec->codec_id));
ret = AVERROR(EINVAL);
@@ -917,7 +917,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
if (!native_id &&
ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id) &&
- (!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id) ||
+ ((!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id) && codec->codec_id != AV_CODEC_ID_RAWVIDEO) ||
codec->codec_id == AV_CODEC_ID_SVQ1 ||
codec->codec_id == AV_CODEC_ID_SVQ3 ||
codec->codec_id == AV_CODEC_ID_CINEPAK))