Ticket #1994: movenc.diff

File movenc.diff, 747 bytes (added by ami_stuff, 4 years ago)
  • libavformat/movenc.c

    diff --git a/libavformat/movenc.c b/libavformat/movenc.c
    index f08aa7e..3e3ac24 100644
    a b static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track) 
    11091109    avio_w8(pb, strlen(compressor_name)); 
    11101110    avio_write(pb, compressor_name, 31); 
    11111111 
    1112     if (track->mode == MODE_MOV && track->enc->bits_per_coded_sample) 
     1112    if (track->mode == MODE_MOV && 
     1113        track->enc->codec_id == AV_CODEC_ID_RAWVIDEO && 
     1114        track->enc->pix_fmt == PIX_FMT_GRAY8) 
     1115        avio_wb16(pb, 0x28); 
     1116    else if (track->mode == MODE_MOV && track->enc->bits_per_coded_sample) 
    11131117        avio_wb16(pb, track->enc->bits_per_coded_sample); 
    11141118    else 
    11151119        avio_wb16(pb, 0x18); /* Reserved */