mssdemux: remove unnecessary check

stream->current_fragment has the value of g_list_previous (iter) which has
just been checked. No need to check it again.

Just to be safe, use a g_assert() to check fragment before dereferencing.

CID #1352041
This commit is contained in:
Luis de Bethencourt 2016-02-09 21:35:19 +00:00
parent 632111ae14
commit 8d445ee758

View file

@ -1149,8 +1149,8 @@ gst_mss_stream_seek (GstMssStream * stream, gboolean forward,
} else if (stream->fragment_repetition_index == -1) { } else if (stream->fragment_repetition_index == -1) {
if (g_list_previous (iter)) { if (g_list_previous (iter)) {
stream->current_fragment = g_list_previous (iter); stream->current_fragment = g_list_previous (iter);
fragment = fragment = stream->current_fragment->data;
stream->current_fragment ? stream->current_fragment->data : NULL; g_assert (fragment);
stream->fragment_repetition_index = fragment->repetitions - 1; stream->fragment_repetition_index = fragment->repetitions - 1;
} else { } else {
stream->fragment_repetition_index = 0; stream->fragment_repetition_index = 0;