changeset 4977:586df9be38ad libavformat

cosmetics, reindent, remove useless braces, whitespaces
author bcoudurier
date Sun, 31 May 2009 00:33:37 +0000
parents c236ec233a09
children deaa9053dc97
files mpegts.c
diffstat 1 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Sun May 31 00:31:47 2009 +0000
+++ b/mpegts.c	Sun May 31 00:33:37 2009 +0000
@@ -622,27 +622,26 @@
                stream_type, pid);
 
         /* now create ffmpeg stream */
-            if(ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES){
-                pes= ts->pids[pid]->u.pes_filter.opaque;
-                st= pes->st;
-            }else{
-                if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably
-                pes = add_pes_stream(ts, pid, pcr_pid, stream_type);
-                if (pes)
-                    st = new_pes_av_stream(pes, 0);
-            }
-            add_pid_to_pmt(ts, h->id, pid);
-            if(st)
-                av_program_add_stream_index(ts->stream, h->id, st->index);
+        if (ts->pids[pid] && ts->pids[pid]->type == MPEGTS_PES) {
+            pes= ts->pids[pid]->u.pes_filter.opaque;
+            st= pes->st;
+        } else {
+            if (ts->pids[pid]) mpegts_close_filter(ts, ts->pids[pid]); //wrongly added sdt filter probably
+            pes = add_pes_stream(ts, pid, pcr_pid, stream_type);
+            if (pes)
+                st = new_pes_av_stream(pes, 0);
+        }
 
-        if (st) {
-            if (language[0] != 0) {
+        add_pid_to_pmt(ts, h->id, pid);
+
+        if(st) {
+            av_program_add_stream_index(ts->stream, h->id, st->index);
+
+            if (language[0] != 0)
                 av_metadata_set(&st->metadata, "language", language);
-            }
 
-            if (stream_type == STREAM_TYPE_SUBTITLE_DVB) {
+            if (stream_type == STREAM_TYPE_SUBTITLE_DVB)
                 st->codec->sub_id = (anc_page << 16) | comp_page;
-            }
         }
     }
     /* all parameters are there */