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
This commit is contained in:
Luis de Bethencourt 2015-01-12 12:50:33 +00:00
parent 9f3a5fc168
commit 8b2fc918b6

View file

@ -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);