nonstreamaudio: Avoid using un-initialized value

We would end up with cur_position not set but proceed being at its
default value of TRUE. Instead, properly set proceed to FALSE

CID #1409855
This commit is contained in:
Edward Hervey 2017-05-26 17:41:39 +02:00 committed by Edward Hervey
parent cf362be9ff
commit 2a193cde84

View file

@ -593,9 +593,11 @@ gst_nonstream_audio_decoder_set_property (GObject * object, guint prop_id,
proceed = FALSE;
GST_WARNING_OBJECT (dec, "switching to new output mode failed");
}
} else
} else {
GST_DEBUG_OBJECT (dec,
"cannot call set_output_mode, since it is NULL");
proceed = FALSE;
}
if (proceed) {
gst_nonstream_audio_decoder_output_new_segment (dec, cur_position);
@ -639,9 +641,11 @@ gst_nonstream_audio_decoder_set_property (GObject * object, guint prop_id,
proceed = FALSE;
GST_WARNING_OBJECT (dec, "switching to new subsong mode failed");
}
} else
} else {
GST_DEBUG_OBJECT (dec,
"cannot call set_subsong_mode, since it is NULL");
proceed = FALSE;
}
if (proceed) {
if (GST_CLOCK_TIME_IS_VALID (cur_position))