forked from FFmpeg/FFmpeg
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:
commit
c9e0f7a080
1 changed files with 17 additions and 5 deletions
|
@ -1578,6 +1578,12 @@ static int mov_write_vmhd_tag(AVIOContext *pb)
|
|||
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)
|
||||
{
|
||||
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";
|
||||
descr = "SoundHandler";
|
||||
} 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";
|
||||
descr = "ClosedCaptionHandler";
|
||||
} else {
|
||||
|
@ -1667,7 +1673,7 @@ static int mov_write_minf_tag(AVIOContext *pb, MOVTrack *track)
|
|||
else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
mov_write_smhd_tag(pb);
|
||||
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);
|
||||
} else {
|
||||
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
|
||||
if (track->tag == MKTAG('r','t','p',' '))
|
||||
mov_write_udta_sdp(pb, track);
|
||||
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
|
||||
double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
|
||||
if (st->sample_aspect_ratio.num && 1.0 != sample_aspect_ratio)
|
||||
if (track->mode == MODE_MOV) {
|
||||
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
return update_size(pb, pos);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue