This corrects a few values in the Image Description for v210 and v410 in mov. Apple defines what the depth value for these uncompressed formats should be in https://developer.apple.com/library/content/technotes/tn2162/_index.html <https://developer.apple.com/library/content/technotes/tn2162/_index.html>.
From 47def189b270ac93245e002580463b254daf8484 Mon Sep 17 00:00:00 2001 From: Dave Rice <d...@dericed.com> Date: Thu, 16 Nov 2017 11:53:32 -0500 Subject: [PATCH] avformat/movenc: correct ImageDescription depth for v210 v410 Per https://developer.apple.com/library/content/technotes/tn2162/_index.html . --- libavformat/movenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 18232e8ba3..f7b08e2885 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1885,7 +1885,11 @@ static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tr avio_w8(pb, strlen(compressor_name)); avio_write(pb, compressor_name, 31); - if (track->mode == MODE_MOV && track->par->bits_per_coded_sample) + if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V410) + avio_wb16(pb, 0x18); + else if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V210) + avio_wb16(pb, 0x18); + else if (track->mode == MODE_MOV && track->par->bits_per_coded_sample) avio_wb16(pb, track->par->bits_per_coded_sample | (track->par->format == AV_PIX_FMT_GRAY8 ? 0x20 : 0)); else -- 2.15.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel