@@ -4939,16 +4939,16 @@ static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track)
int i;
if (!track->every_sample_keyframe) {
- /* We can't write and then update number_of_entry, because we cannot fix
- * the case when number_of_entry is zero, since zero indicates that every
- * sample is a sync sample. So get number_of_entry first.
- */
- for (i = 0; i < track->nb_frag_info; i++) {
- if (track->frag_info[i].first_sample_flags & MOV_SYNC_SAMPLE)
- number_of_entry++;
- }
- if (!number_of_entry)
- return 0;
+ /* We can't write and then update number_of_entry, because we cannot fix
+ * the case when number_of_entry is zero, since zero indicates that every
+ * sample is a sync sample. So get number_of_entry first.
+ */
+ for (i = 0; i < track->nb_frag_info; i++) {
+ if (track->frag_info[i].first_sample_flags & MOV_SYNC_SAMPLE)
+ number_of_entry++;
+ }
+ if (!number_of_entry)
+ return 0;
}
avio_wb32(pb, 0); /* size placeholder */
@@ -4959,18 +4959,18 @@ static int mov_write_tfra_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32(pb, track->track_id);
avio_wb32(pb, 0); /* length of traf/trun/sample num */
if (track->every_sample_keyframe) {
- avio_wb32(pb, 0);
+ avio_wb32(pb, 0);
} else {
- avio_wb32(pb, number_of_entry);
- for (i = 0; i < track->nb_frag_info; i++) {
- if (!(track->frag_info[i].first_sample_flags & MOV_SYNC_SAMPLE))
- continue;
- avio_wb64(pb, track->frag_info[i].time);
- avio_wb64(pb, track->frag_info[i].offset + track->data_offset);
- avio_w8(pb, track->frag_info[i].traf_index); /* traf number */
- avio_w8(pb, 1); /* trun number */
- avio_w8(pb, 1); /* sample number */
- }
+ avio_wb32(pb, number_of_entry);
+ for (i = 0; i < track->nb_frag_info; i++) {
+ if (!(track->frag_info[i].first_sample_flags & MOV_SYNC_SAMPLE))
+ continue;
+ avio_wb64(pb, track->frag_info[i].time);
+ avio_wb64(pb, track->frag_info[i].offset + track->data_offset);
+ avio_w8(pb, track->frag_info[i].traf_index); /* traf number */
+ avio_w8(pb, 1); /* trun number */
+ avio_w8(pb, 1); /* sample number */
+ }
}
return update_size(pb, pos);