Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[gst-plugins-base] Fix appsrc based pipelines reporting the wrong dur…
…ation. Fixes JB#37547
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
rpm/0001-Fix-pipelines-with-appsrc-returning-incorrect-durati.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters