Commit e2fb12b6 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ad1549ae
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment