From patchwork Tue Nov 12 21:29:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 16231 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 29BD644A5E4 for ; Tue, 12 Nov 2019 23:29:33 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E9BA68A9CE; Tue, 12 Nov 2019 23:29:33 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E09B568A9EF for ; Tue, 12 Nov 2019 23:29:30 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C1D95E3E43; Tue, 12 Nov 2019 22:29:30 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6MAVR4NwrK2P; Tue, 12 Nov 2019 22:29:29 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 3EE2DE3E4C; Tue, 12 Nov 2019 22:29:28 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Nov 2019 22:29:06 +0100 Message-Id: <20191112212906.18539-10-cus@passwd.hu> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191112212906.18539-1-cus@passwd.hu> References: <20191112212906.18539-1-cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH 10/10] avformat/mpegtsenc: fix indentation X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Marton Balint --- libavformat/mpegtsenc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index d8a74f4fe1..df015f588d 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1255,26 +1255,26 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, ts->m2ts_last_pcr = FFMAX(pcr - ts->m2ts_pcr_period, ts->m2ts_last_pcr + ts->m2ts_pcr_period); next_pcr = FFMIN(next_pcr, ts->m2ts_last_pcr + ts->m2ts_pcr_period); } else { - for (int i = 0; i < s->nb_streams; i++) { - /* Make the current stream the last, because for that we - * can insert the pcr into the payload later */ - int st2_index = i < st->index ? i : (i + 1 == s->nb_streams ? st->index : i + 1); - AVStream *st2 = s->streams[st2_index]; - MpegTSWriteStream *ts_st2 = st2->priv_data; - if (ts_st2->pcr_period) { - if (pcr - ts_st2->last_pcr >= ts_st2->pcr_period) { - ts_st2->last_pcr = FFMAX(pcr - ts_st2->pcr_period, ts_st2->last_pcr + ts_st2->pcr_period); - if (st2 != st) { - mpegts_insert_pcr_only_for_stream(s, st2); - pcr = get_pcr(ts, s->pb); - } else { - write_pcr = 1; + for (int i = 0; i < s->nb_streams; i++) { + /* Make the current stream the last, because for that we + * can insert the pcr into the payload later */ + int st2_index = i < st->index ? i : (i + 1 == s->nb_streams ? st->index : i + 1); + AVStream *st2 = s->streams[st2_index]; + MpegTSWriteStream *ts_st2 = st2->priv_data; + if (ts_st2->pcr_period) { + if (pcr - ts_st2->last_pcr >= ts_st2->pcr_period) { + ts_st2->last_pcr = FFMAX(pcr - ts_st2->pcr_period, ts_st2->last_pcr + ts_st2->pcr_period); + if (st2 != st) { + mpegts_insert_pcr_only_for_stream(s, st2); + pcr = get_pcr(ts, s->pb); + } else { + write_pcr = 1; + } } + next_pcr = FFMIN(next_pcr, ts_st2->last_pcr + ts_st2->pcr_period); } - next_pcr = FFMIN(next_pcr, ts_st2->last_pcr + ts_st2->pcr_period); } } - } ts->next_pcr = next_pcr; } if (dts != AV_NOPTS_VALUE && (dts - pcr / 300) > delay) {