From 0a197832915e124df835295fd1b05b2b53b3558f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 28 Aug 2014 17:06:22 +0300 Subject: [PATCH] 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 --- gst-libs/gst/video/gstvideodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 384e026..8074b01 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -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; -- 2.7.4