From: <bi...@ke...> - 2009-04-03 09:09:05
|
Module: gnonlin Branch: master Commit: 0e9923e1b65372ae2b57c4bcdbd394a172fe5a7b URL: http://cgit.freedesktop.org/gstreamer/gnonlin/commit/?id=0e9923e1b65372ae2b57c4bcdbd394a172fe5a7b Author: Edward Hervey <bi...@bi...> Date: Fri Apr 3 11:05:41 2009 +0200 gnlcomposition: Take into account the result of the position query. --- gnl/gnlcomposition.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 943be14..3762120 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -718,8 +718,9 @@ get_current_position (GnlComposition * comp) res = gst_pad_query_position (pad, &format, &value); - if (format != GST_FORMAT_TIME) { - GST_WARNING_OBJECT (comp, "query returned a format different from TIME"); + if (G_UNLIKELY ((res == FALSE) || (format != GST_FORMAT_TIME))) { + GST_WARNING_OBJECT (comp, + "query failed or returned a format different from TIME"); value = GST_CLOCK_TIME_NONE; } else { GST_LOG_OBJECT (comp, "Query returned %" GST_TIME_FORMAT, |