avformat/matroskaenc: Do not use native mode for raw RGB
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Feb 2015 11:47:35 +0000 (12:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 14 Feb 2015 12:02:30 +0000 (13:02 +0100)
This fixes generating totally unplayable files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskaenc.c

index 810a608..eb6e859 100644 (file)
@@ -879,6 +879,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
                 break;
             }
         }
+        if (codec->codec_id == AV_CODEC_ID_RAWVIDEO && !codec->codec_tag)
+            native_id = 0;
     }
 
     if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->initial_padding && codec->codec_id == AV_CODEC_ID_OPUS) {