Commit 5f2461e5 authored by Andrew den Exter's avatar Andrew den Exter Committed by Andrew Branson

[gst-plugins-base] Fix appsrc based pipelines reporting the wrong duration. Fixes JB#37547

parent 997375b2
From 6cfd94d8f9396da2d4769722222fb0f64713b3c1 Mon Sep 17 00:00:00 2001
From: Andrew den Exter <andrew.den.exter@jolla.com>
Date: Fri, 21 Apr 2017 18:24:59 +1000
Subject: [PATCH] Fix pipelines with appsrc returning incorrect durations.
Allow downstream elements to try and provide the duration if the
duration property is not set or equal to GST_CLOCK_TIME_NONE.
---
gst-libs/gst/app/gstappsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c
index 5a44a45..6959af6 100644
--- a/gst-libs/gst/app/gstappsrc.c
+++ b/gst-libs/gst/app/gstappsrc.c
@@ -956,7 +956,7 @@ gst_app_src_query (GstBaseSrc * src, GstQuery * query)
if (format == GST_FORMAT_BYTES) {
gst_query_set_duration (query, format, priv->size);
res = TRUE;
- } else if (format == GST_FORMAT_TIME) {
+ } else if (format == GST_FORMAT_TIME && priv->duration != GST_CLOCK_TIME_NONE) {
gst_query_set_duration (query, format, priv->duration);
res = TRUE;
} else {
--
2.9.3
......@@ -10,6 +10,7 @@ Group: Applications/Multimedia
License: LGPLv2+
URL: http://gstreamer.freedesktop.org/
Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gstreamer1.0-plugins-base-%{version}.tar.xz
Patch0: 0001-Fix-pipelines-with-appsrc-returning-incorrect-durati.patch
%define sonamever %(echo %{version} | cut -d '+' -f 1)
......@@ -53,6 +54,7 @@ GStreamer Plugins Base library applications
%prep
%setup -q -n gstreamer1.0-plugins-base-%{version}/gst-plugins-base
%patch0 -p1
%build
NOCONFIGURE=1 ./autogen.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment