mpegdemux: minor optimisation when scanning for SCRs

Bail out early when we're scanning for SCR, no need to
parse stuff we're not going to use nor interested in.
This commit is contained in:
Tim-Philipp Müller 2015-01-11 20:40:34 +00:00
parent 9aaf12aae0
commit 9f3a5fc168

View file

@ -2467,6 +2467,7 @@ gst_ps_demux_scan_ts (GstPsDemux * demux, const guint8 * data,
if (mode == SCAN_SCR) { if (mode == SCAN_SCR) {
*rts = scr; *rts = scr;
ret = TRUE; ret = TRUE;
goto beach;
} }
/* read the 4 bytes for the PES sync code */ /* read the 4 bytes for the PES sync code */