videodecoder: 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 1226440
This commit is contained in:
Sebastian Dröge 2014-08-28 17:06:22 +03:00
parent d357f28260
commit 0a19783291

View file

@ -1287,7 +1287,7 @@ gst_video_decoder_do_seek (GstVideoDecoder * 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;