You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/movenc: write clap atom for uncompressed yuv in mov
fixes 6145 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
1e5f923416
commit
8f4702a93f
@@ -1686,6 +1686,21 @@ static int mov_write_sv3d_tag(AVFormatContext *s, AVIOContext *pb, AVSphericalMa
|
|||||||
return update_size(pb, sv3d_pos);
|
return update_size(pb, sv3d_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mov_write_clap_tag(AVIOContext *pb, MOVTrack *track)
|
||||||
|
{
|
||||||
|
avio_wb32(pb, 40);
|
||||||
|
ffio_wfourcc(pb, "clap");
|
||||||
|
avio_wb32(pb, track->par->width); /* apertureWidth_N */
|
||||||
|
avio_wb32(pb, 1); /* apertureWidth_D (= 1) */
|
||||||
|
avio_wb32(pb, track->height); /* apertureHeight_N */
|
||||||
|
avio_wb32(pb, 1); /* apertureHeight_D (= 1) */
|
||||||
|
avio_wb32(pb, 0); /* horizOff_N (= 0) */
|
||||||
|
avio_wb32(pb, 1); /* horizOff_D (= 1) */
|
||||||
|
avio_wb32(pb, 0); /* vertOff_N (= 0) */
|
||||||
|
avio_wb32(pb, 1); /* vertOff_D (= 1) */
|
||||||
|
return 40;
|
||||||
|
}
|
||||||
|
|
||||||
static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
|
static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
|
||||||
{
|
{
|
||||||
AVRational sar;
|
AVRational sar;
|
||||||
@@ -1984,6 +1999,10 @@ static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tr
|
|||||||
mov_write_pasp_tag(pb, track);
|
mov_write_pasp_tag(pb, track);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uncompressed_ycbcr){
|
||||||
|
mov_write_clap_tag(pb, track);
|
||||||
|
}
|
||||||
|
|
||||||
if (mov->encryption_scheme != MOV_ENC_NONE) {
|
if (mov->encryption_scheme != MOV_ENC_NONE) {
|
||||||
ff_mov_cenc_write_sinf_tag(track, pb, mov->encryption_kid);
|
ff_mov_cenc_write_sinf_tag(track, pb, mov->encryption_kid);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user