dashdemux: Improve if cause readability

Fixed up the error-handling code when downloading fragments.
Modifed the error-handling code to use positive logic when
testing for cancellation of the download loop.

https://bugzilla.gnome.org/show_bug.cgi?id=701404
This commit is contained in:
Greg Rutz 2013-06-12 10:50:51 -06:00 committed by Thiago Santos
parent b8dd95e219
commit 6819d1a206

View file

@ -1697,7 +1697,9 @@ gst_dash_demux_download_loop (GstDashDemux * demux)
gst_mpd_client_set_segment_index_for_all_streams (demux->client, 0);
demux->end_of_period = FALSE;
} else if (!demux->cancelled) {
} else if (demux->cancelled) {
goto cancelled;
} else {
/* Download failed 'by itself'
* in case this is live, we might be ahead or before playback, where
* segments don't exist (are still being created or were already deleted)
@ -1746,8 +1748,6 @@ gst_dash_demux_download_loop (GstDashDemux * demux)
} else {
goto error_downloading;
}
} else if (demux->cancelled) {
goto cancelled;
}
}