diff mbox series

[FFmpeg-devel,23/35] fftools/ffmpeg_mux: reindent

Message ID 20220616195534.5278-23-anton@khirnov.net
State Accepted
Commit 919638ff5c99e33d91974506b19d42dcee04690b
Headers show
Series [FFmpeg-devel,01/35] fftools/ffmpeg_mux: add private muxer context | expand

Checks

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

Commit Message

Anton Khirnov June 16, 2022, 7:55 p.m. UTC
---
 fftools/ffmpeg_mux.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 453ccac912..641bdb98b0 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -98,16 +98,16 @@  static int queue_packet(OutputFile *of, OutputStream *ost, AVPacket *pkt)
     }
 
     if (pkt) {
-    ret = av_packet_make_refcounted(pkt);
-    if (ret < 0)
-        return ret;
+        ret = av_packet_make_refcounted(pkt);
+        if (ret < 0)
+            return ret;
 
-    tmp_pkt = av_packet_alloc();
-    if (!tmp_pkt)
-        return AVERROR(ENOMEM);
+        tmp_pkt = av_packet_alloc();
+        if (!tmp_pkt)
+            return AVERROR(ENOMEM);
 
-    av_packet_move_ref(tmp_pkt, pkt);
-    ms->muxing_queue_data_size += tmp_pkt->size;
+        av_packet_move_ref(tmp_pkt, pkt);
+        ms->muxing_queue_data_size += tmp_pkt->size;
     }
     av_fifo_write(ms->muxing_queue, &tmp_pkt, 1);
 
@@ -236,20 +236,20 @@  void of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
     int ret;
 
     if (pkt) {
-    /*
-     * Audio encoders may split the packets --  #frames in != #packets out.
-     * But there is no reordering, so we can limit the number of output packets
-     * by simply dropping them here.
-     * Counting encoded video frames needs to be done separately because of
-     * reordering, see do_video_out().
-     */
-    if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed)) {
-        if (ost->frame_number >= ost->max_frames) {
-            av_packet_unref(pkt);
-            return;
+        /*
+         * Audio encoders may split the packets --  #frames in != #packets out.
+         * But there is no reordering, so we can limit the number of output packets
+         * by simply dropping them here.
+         * Counting encoded video frames needs to be done separately because of
+         * reordering, see do_video_out().
+         */
+        if (!(st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->encoding_needed)) {
+            if (ost->frame_number >= ost->max_frames) {
+                av_packet_unref(pkt);
+                return;
+            }
+            ost->frame_number++;
         }
-        ost->frame_number++;
-    }
     }
 
     if (of->mux->header_written) {