diff mbox series

[FFmpeg-devel,5/5] avformat/movenc: reindent after last commit

Message ID tencent_B64E4570C32D749A8B40279A389F7CAB1608@qq.com
State New
Headers show
Series [FFmpeg-devel,1/5] avformat/movenc: remove unused argument from get_sample_flags() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Zhao Zhili Dec. 3, 2021, 5:06 a.m. UTC
---
 libavformat/movenc.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
diff mbox series

Patch

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);