diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-04-03 11:05:41 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-04-03 11:05:41 +0200 |
commit | 0e9923e1b65372ae2b57c4bcdbd394a172fe5a7b (patch) | |
tree | 5db8742052e717a924a41315a3b16144339c7fb3 | |
parent | aecf2cc57b81732be9f19451c4edc6c46f95432d (diff) |
gnlcomposition: Take into account the result of the position query.
-rw-r--r-- | 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, |