diff mbox series

[FFmpeg-devel,4/8] avformat/mpegtsenc: reindent the last commit

Message ID 1595431659-664-4-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit a35facfeb3a27d3d3aee13adbd74d265e42f40c0
Headers show
Series [FFmpeg-devel,1/8] avformat/mpegts: add dvb ac3 descriptor metadata
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Limin Wang July 22, 2020, 3:27 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavformat/mpegtsenc.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

Comments

Marton Balint July 22, 2020, 5:50 p.m. UTC | #1
On Wed, 22 Jul 2020, lance.lmwang@gmail.com wrote:

> From: Limin Wang <lance.lmwang@gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
> libavformat/mpegtsenc.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index 2d7a8ab..28d535a 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -484,16 +484,15 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
>         switch (st->codecpar->codec_type) {
>         case AVMEDIA_TYPE_AUDIO:
>             if (ts->flags & MPEGTS_FLAG_SYSTEM_B) {
> -            if (st->codecpar->codec_id==AV_CODEC_ID_AC3) {
> -                *q++=0x6a; // AC3 descriptor see A038 DVB SI
> -                *q++=1; // 1 byte, all flags sets to 0
> -                *q++=0; // omit all fields...
> -            }
> -            else if (st->codecpar->codec_id==AV_CODEC_ID_EAC3) {
> -                *q++=0x7a; // EAC3 descriptor see A038 DVB SI
> -                *q++=1; // 1 byte, all flags sets to 0
> -                *q++=0; // omit all fields...
> -            }
> +                if (st->codecpar->codec_id==AV_CODEC_ID_AC3) {
> +                    *q++=0x6a; // AC3 descriptor see A038 DVB SI
> +                    *q++=1; // 1 byte, all flags sets to 0
> +                    *q++=0; // omit all fields...
> +                } else if (st->codecpar->codec_id==AV_CODEC_ID_EAC3) {
> +                    *q++=0x7a; // EAC3 descriptor see A038 DVB SI
> +                    *q++=1; // 1 byte, all flags sets to 0
> +                    *q++=0; // omit all fields...
> +                }
>             }

LGTM, thanks.

Marton
diff mbox series

Patch

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 2d7a8ab..28d535a 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -484,16 +484,15 @@  static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
         switch (st->codecpar->codec_type) {
         case AVMEDIA_TYPE_AUDIO:
             if (ts->flags & MPEGTS_FLAG_SYSTEM_B) {
-            if (st->codecpar->codec_id==AV_CODEC_ID_AC3) {
-                *q++=0x6a; // AC3 descriptor see A038 DVB SI
-                *q++=1; // 1 byte, all flags sets to 0
-                *q++=0; // omit all fields...
-            }
-            else if (st->codecpar->codec_id==AV_CODEC_ID_EAC3) {
-                *q++=0x7a; // EAC3 descriptor see A038 DVB SI
-                *q++=1; // 1 byte, all flags sets to 0
-                *q++=0; // omit all fields...
-            }
+                if (st->codecpar->codec_id==AV_CODEC_ID_AC3) {
+                    *q++=0x6a; // AC3 descriptor see A038 DVB SI
+                    *q++=1; // 1 byte, all flags sets to 0
+                    *q++=0; // omit all fields...
+                } else if (st->codecpar->codec_id==AV_CODEC_ID_EAC3) {
+                    *q++=0x7a; // EAC3 descriptor see A038 DVB SI
+                    *q++=1; // 1 byte, all flags sets to 0
+                    *q++=0; // omit all fields...
+                }
             }
             if (st->codecpar->codec_id==AV_CODEC_ID_S302M)
                 put_registration_descriptor(&q, MKTAG('B', 'S', 'S', 'D'));