ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sat Feb 14 
12:43:33 2015 +0100| [e2fb12b629e8c5a2a21c7bbd3260e3d316adeef1] | committer: 
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: Michael Niedermayer <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2fb12b629e8c5a2a21c7bbd3260e3d316adeef1
---

 libavformat/matroskaenc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index dabfd86..810a608 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))

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to