audiodecoder: Fix broken boolean expression

We can seek with end_type==NONE and end_type==SET && end_position=-1. The
check for end_type!=NONE made the second condition impossible.

CID 1226439
This commit is contained in:
Sebastian Dröge 2014-08-28 17:00:26 +03:00
parent a5cf0a4572
commit d357f28260

View file

@ -2183,7 +2183,7 @@ gst_audio_decoder_do_seek (GstAudioDecoder * dec, GstEvent * event)
return FALSE;
}
if (end_type != GST_SEEK_TYPE_NONE ||
if ((end_type != GST_SEEK_TYPE_SET && end_type != GST_SEEK_TYPE_NONE) ||
(end_type == GST_SEEK_TYPE_SET && end_time != GST_CLOCK_TIME_NONE)) {
GST_DEBUG_OBJECT (dec, "unsupported seek: end time");
return FALSE;