Commit 647405d1 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '573b1de2'

* commit '573b1de2':
  movenc: Don't use track_id to decide which track is the first in a moof
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 32e666c3 573b1de2
...@@ -3189,7 +3189,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov, ...@@ -3189,7 +3189,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
avio_wb32(pb, track->entry); /* sample count */ avio_wb32(pb, track->entry); /* sample count */
if (mov->flags & FF_MOV_FLAG_OMIT_TFHD_OFFSET && if (mov->flags & FF_MOV_FLAG_OMIT_TFHD_OFFSET &&
!(mov->flags & FF_MOV_FLAG_SEPARATE_MOOF) && !(mov->flags & FF_MOV_FLAG_SEPARATE_MOOF) &&
track->track_id != 1) !mov->first_trun)
avio_wb32(pb, 0); /* Later tracks follow immediately after the previous one */ avio_wb32(pb, 0); /* Later tracks follow immediately after the previous one */
else else
avio_wb32(pb, moof_size + 8 + track->data_offset + avio_wb32(pb, moof_size + 8 + track->data_offset +
...@@ -3208,6 +3208,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov, ...@@ -3208,6 +3208,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
avio_wb32(pb, track->cluster[i].cts); avio_wb32(pb, track->cluster[i].cts);
} }
mov->first_trun = 0;
return update_size(pb, pos); return update_size(pb, pos);
} }
...@@ -3328,6 +3329,7 @@ static int mov_write_moof_tag_internal(AVIOContext *pb, MOVMuxContext *mov, ...@@ -3328,6 +3329,7 @@ static int mov_write_moof_tag_internal(AVIOContext *pb, MOVMuxContext *mov,
avio_wb32(pb, 0); /* size placeholder */ avio_wb32(pb, 0); /* size placeholder */
ffio_wfourcc(pb, "moof"); ffio_wfourcc(pb, "moof");
mov->first_trun = 1;
mov_write_mfhd_tag(pb, mov); mov_write_mfhd_tag(pb, mov);
for (i = 0; i < mov->nb_streams; i++) { for (i = 0; i < mov->nb_streams; i++) {
......
...@@ -171,6 +171,7 @@ typedef struct MOVMuxContext { ...@@ -171,6 +171,7 @@ typedef struct MOVMuxContext {
int max_fragment_size; int max_fragment_size;
int ism_lookahead; int ism_lookahead;
AVIOContext *mdat_buf; AVIOContext *mdat_buf;
int first_trun;
int use_editlist; int use_editlist;
int video_track_timescale; int video_track_timescale;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment