dvddemux: small code cleanup
authorStefan Kost <ensonic@users.sf.net>
Wed, 2 Mar 2011 11:12:11 +0000 (13:12 +0200)
committerStefan Kost <ensonic@users.sf.net>
Wed, 2 Mar 2011 11:12:11 +0000 (13:12 +0200)
Don't duplicate the 'if' check. Makes the 2nd condition easier to read also
and avoid empty 'if' when logging is disabled.

gst/mpegstream/gstdvddemux.c

index 4c53fbf..afe9c1d 100644 (file)
@@ -1200,12 +1200,11 @@ gst_dvd_demux_synchronise_pads (GstMPEGDemux * mpeg_demux,
           ", threshold %" GST_TIME_FORMAT, i,
           GST_TIME_ARGS (dvd_demux->subpicture_stream[i]->cur_ts),
           GST_TIME_ARGS (threshold));
-    }
-    if (dvd_demux->subpicture_stream[i]
-        && (dvd_demux->subpicture_stream[i]->cur_ts < threshold)) {
-      DEMUX_CLASS (mpeg_demux)->sync_stream_to_time (mpeg_demux,
-          dvd_demux->subpicture_stream[i], new_ts);
-      dvd_demux->subpicture_stream[i]->cur_ts = new_ts;
+      if (dvd_demux->subpicture_stream[i]->cur_ts < threshold) {
+        DEMUX_CLASS (mpeg_demux)->sync_stream_to_time (mpeg_demux,
+            dvd_demux->subpicture_stream[i], new_ts);
+        dvd_demux->subpicture_stream[i]->cur_ts = new_ts;
+      }
     }
   }
 }