From d357f282602776c7c3b1615ab360a7810edd054b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 28 Aug 2014 17:00:26 +0300 Subject: [PATCH] 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 --- gst-libs/gst/audio/gstaudiodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index cada95ba89..654f21c1e0 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -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;