Ticket #252: patchmatroskaraw.diff

File patchmatroskaraw.diff, 751 bytes (added by cehoyos, 5 years ago)
  • libavformat/matroskaenc.c

    diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
    index 9901dc0..01ec8ad 100644
    a b static int mkv_write_tracks(AVFormatContext *s) 
    587587                // XXX: interlace flag? 
    588588                put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELWIDTH , codec->width); 
    589589                put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELHEIGHT, codec->height); 
     590                if (codec->codec_id == CODEC_ID_RAWVIDEO) 
     591                    put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &codec->codec_tag, 4); 
    590592 
    591593                if ((tag = av_dict_get(st->metadata, "stereo_mode", NULL, 0)) || 
    592594                    (tag = av_dict_get( s->metadata, "stereo_mode", NULL, 0))) {