diff --git a/rpm/0001-Fix-pipelines-with-appsrc-returning-incorrect-durati.patch b/rpm/0001-Fix-pipelines-with-appsrc-returning-incorrect-durati.patch new file mode 100644 index 0000000..5b02f6b --- /dev/null +++ b/rpm/0001-Fix-pipelines-with-appsrc-returning-incorrect-durati.patch @@ -0,0 +1,27 @@ +From 6cfd94d8f9396da2d4769722222fb0f64713b3c1 Mon Sep 17 00:00:00 2001 +From: Andrew den Exter +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 + diff --git a/rpm/gst-plugins-base.spec b/rpm/gst-plugins-base.spec index 466fabc..b8bb878 100644 --- a/rpm/gst-plugins-base.spec +++ b/rpm/gst-plugins-base.spec @@ -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