diff options
author | Philippe Normand <philn@igalia.com> | 2017-08-12 15:46:28 +0100 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2017-08-14 09:19:26 +0100 |
commit | b24e7535cb365a400521c81a52dd430605107cec (patch) | |
tree | 578e56b2d14df775a78753168bc61c1a16175da4 | |
parent | 035d1d48f11855404073758eebe4e72e2dd38bb7 (diff) | |
download | gstreamer-plugins-base-b24e7535cb365a400521c81a52dd430605107cec.tar.gz |
appsrc: handle duration query only if the property was set
https://bugzilla.gnome.org/show_bug.cgi?id=786200
-rw-r--r-- | gst-libs/gst/app/gstappsrc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c index b0b11513a..0ec0b34d6 100644 --- a/gst-libs/gst/app/gstappsrc.c +++ b/gst-libs/gst/app/gstappsrc.c @@ -938,8 +938,12 @@ gst_app_src_query (GstBaseSrc * src, GstQuery * query) gst_query_set_duration (query, format, priv->size); res = TRUE; } else if (format == GST_FORMAT_TIME) { - gst_query_set_duration (query, format, priv->duration); - res = TRUE; + if (priv->duration != GST_CLOCK_TIME_NONE) { + gst_query_set_duration (query, format, priv->duration); + res = TRUE; + } else { + res = FALSE; + } } else { res = FALSE; } |