summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2016-01-08 15:05:38 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2016-01-08 15:05:38 -0300
commit5ef0a0979419b20f3aa7d40ba3be3657b53ea738 (patch)
tree69b18845b5f2a39dddc1b314b8eaaaabfcc651b9
parent56be0653e03f666c4e5a7fff91824f775d442da4 (diff)
videorate: replace accept-caps with a caps query
accept-caps is only a shallow check, it needs to know whether downstream as a whole accepts the framerate
-rw-r--r--gst/videorate/gstvideorate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c
index 2c17ba4bc..4a815d544 100644
--- a/gst/videorate/gstvideorate.c
+++ b/gst/videorate/gstvideorate.c
@@ -1011,7 +1011,7 @@ gst_video_rate_check_variable_rate (GstVideoRate * videorate,
{
GstStructure *st;
gint fps_d, fps_n;
- GstCaps *srcpadcaps, *tmpcaps;
+ GstCaps *srcpadcaps, *tmpcaps, *downstream_caps;
GstPad *pad = NULL;
srcpadcaps =
@@ -1026,13 +1026,16 @@ gst_video_rate_check_variable_rate (GstVideoRate * videorate,
gst_caps_unref (srcpadcaps);
pad = gst_pad_get_peer (GST_BASE_TRANSFORM_SRC_PAD (videorate));
- if (pad && !gst_pad_query_accept_caps (pad, tmpcaps)) {
+ downstream_caps = gst_pad_query_caps (pad, NULL);
+ if (pad && !gst_caps_can_intersect (tmpcaps, downstream_caps)) {
videorate->force_variable_rate = TRUE;
+ gst_caps_unref (downstream_caps);
GST_DEBUG_OBJECT (videorate, "Downstream forces variable framerate"
" respecting it");
goto done;
}
+ gst_caps_unref (downstream_caps);
videorate->to_rate_numerator = fps_n;
videorate->to_rate_denominator = fps_d;