summaryrefslogtreecommitdiff
path: root/gst/mpegdemux/gstmpegdemux.c
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-01-12 12:50:33 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-01-12 12:59:20 +0000
commit8b2fc918b67cfb965bcca6d6a3b7957f38ba7797 (patch)
treefdd1f3fd884ca14983818c167fa77f9262b84b13 /gst/mpegdemux/gstmpegdemux.c
parent9f3a5fc168ead871019a949bbb3fb763ce0038a1 (diff)
downloadgstreamer-plugins-bad-8b2fc918b67cfb965bcca6d6a3b7957f38ba7797.tar.gz
mpegdemux: fix dead code
found is initialized to FALSE to then only be used in two conditional statements that will always be false, making the blocks inside them dead code. Looking back in the file's history the setting of the variable's value before it is checked was dropped as part of the port to 0.11, bringing that value setting back. https://bugzilla.gnome.org/show_bug.cgi?id=742638
Diffstat (limited to 'gst/mpegdemux/gstmpegdemux.c')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index f3ea040ff..c05a59db6 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -1148,7 +1148,7 @@ find_offset (GstPsDemux * demux, guint64 scr,
static inline gboolean
gst_ps_demux_do_seek (GstPsDemux * demux, GstSegment * seeksegment)
{
- gboolean found = FALSE;
+ gboolean found;
guint64 fscr, offset;
guint64 scr = GSTTIME_TO_MPEGTIME (seeksegment->position + demux->base_time);
@@ -1173,6 +1173,10 @@ gst_ps_demux_do_seek (GstPsDemux * demux, GstSegment * seeksegment)
return FALSE;
}
+ found = gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+ if (!found)
+ found = gst_ps_demux_scan_backward_ts (demux, &offset, SCAN_SCR, &fscr, 0);
+
while (found && fscr < scr) {
offset++;
found = gst_ps_demux_scan_forward_ts (demux, &offset, SCAN_SCR, &fscr, 0);