From 8b2fc918b67cfb965bcca6d6a3b7957f38ba7797 Mon Sep 17 00:00:00 2001 From: Luis de Bethencourt Date: Mon, 12 Jan 2015 12:50:33 +0000 Subject: [PATCH] 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 --- gst/mpegdemux/gstmpegdemux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c index f3ea040ff6..c05a59db6c 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);