You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Merge commit '99e22b7859177f6d3ed6121040924b337dce5497'
* commit '99e22b7859177f6d3ed6121040924b337dce5497':
mov: Emit the correct tags for clcp tracks
Conflicts:
libavformat/movenc.c
See: a5f6720f13
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1578,6 +1578,12 @@ static int mov_write_vmhd_tag(AVIOContext *pb)
|
|||||||
return 0x14;
|
return 0x14;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int is_clcp_track(MOVTrack *track)
|
||||||
|
{
|
||||||
|
return track->tag == MKTAG('c','7','0','8') ||
|
||||||
|
track->tag == MKTAG('c','6','0','8');
|
||||||
|
}
|
||||||
|
|
||||||
static int mov_write_hdlr_tag(AVIOContext *pb, MOVTrack *track)
|
static int mov_write_hdlr_tag(AVIOContext *pb, MOVTrack *track)
|
||||||
{
|
{
|
||||||
const char *hdlr, *descr = NULL, *hdlr_type = NULL;
|
const char *hdlr, *descr = NULL, *hdlr_type = NULL;
|
||||||
@@ -1596,7 +1602,7 @@ static int mov_write_hdlr_tag(AVIOContext *pb, MOVTrack *track)
|
|||||||
hdlr_type = "soun";
|
hdlr_type = "soun";
|
||||||
descr = "SoundHandler";
|
descr = "SoundHandler";
|
||||||
} else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
} else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||||
if (track->tag == MKTAG('c','6','0','8')) {
|
if (is_clcp_track(track)) {
|
||||||
hdlr_type = "clcp";
|
hdlr_type = "clcp";
|
||||||
descr = "ClosedCaptionHandler";
|
descr = "ClosedCaptionHandler";
|
||||||
} else {
|
} else {
|
||||||
@@ -1667,7 +1673,7 @@ static int mov_write_minf_tag(AVIOContext *pb, MOVTrack *track)
|
|||||||
else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
|
else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||||
mov_write_smhd_tag(pb);
|
mov_write_smhd_tag(pb);
|
||||||
else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||||
if (track->tag == MKTAG('t','e','x','t') || track->tag == MKTAG('c','6','0','8')) {
|
if (track->tag == MKTAG('t','e','x','t') || is_clcp_track(track)) {
|
||||||
mov_write_gmhd_tag(pb, track);
|
mov_write_gmhd_tag(pb, track);
|
||||||
} else {
|
} else {
|
||||||
mov_write_nmhd_tag(pb);
|
mov_write_nmhd_tag(pb);
|
||||||
@@ -1973,10 +1979,16 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
|
|||||||
mov_write_uuid_tag_psp(pb, track); // PSP Movies require this uuid box
|
mov_write_uuid_tag_psp(pb, track); // PSP Movies require this uuid box
|
||||||
if (track->tag == MKTAG('r','t','p',' '))
|
if (track->tag == MKTAG('r','t','p',' '))
|
||||||
mov_write_udta_sdp(pb, track);
|
mov_write_udta_sdp(pb, track);
|
||||||
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
|
if (track->mode == MODE_MOV) {
|
||||||
double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
|
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||||
if (st->sample_aspect_ratio.num && 1.0 != sample_aspect_ratio)
|
double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
|
||||||
|
if (st->sample_aspect_ratio.num && 1.0 != sample_aspect_ratio) {
|
||||||
|
mov_write_tapt_tag(pb, track);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_clcp_track(track)) {
|
||||||
mov_write_tapt_tag(pb, track);
|
mov_write_tapt_tag(pb, track);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return update_size(pb, pos);
|
return update_size(pb, pos);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user