[FFmpeg-devel] [PATCH 5/5] avformat/movenc: reindent after last commit
Zhao Zhili
quinkblack at foxmail.com
Fri Dec 3 07:06:57 EET 2021
---
libavformat/movenc.c | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 01dfd21a43..3c7c951c7d 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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);
--
2.31.1
More information about the ffmpeg-devel
mailing list