diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-08-25 12:56:21 +0300 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-09-25 07:55:57 +0000 |
commit | 24be5f386017fabf2e69dc241485840d42bbe38d (patch) | |
tree | 7d3b6a8dc6ed8b337b62dff84d43270220f2b3f1 | |
parent | f0d9cb39c4ebe081024401a1108a511f06d31a68 (diff) | |
download | gstreamer-plugins-base-24be5f386017fabf2e69dc241485840d42bbe38d.tar.gz |
videorate/videoscale/audioresample: Ensure that the caps returned from fixate_caps() are actually fixated
If there is some other field than the ones we care about left and not
fixated yet then basetransform will just error out. So instead just pass
the result through gst_caps_fixate() in the very end.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/832>
-rw-r--r-- | gst/audioresample/gstaudioresample.c | 2 | ||||
-rw-r--r-- | gst/videorate/gstvideorate.c | 2 | ||||
-rw-r--r-- | gst/videoscale/gstvideoscale.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/gst/audioresample/gstaudioresample.c b/gst/audioresample/gstaudioresample.c index fc73af64f..31fb53fcc 100644 --- a/gst/audioresample/gstaudioresample.c +++ b/gst/audioresample/gstaudioresample.c @@ -348,7 +348,7 @@ gst_audio_resample_fixate_caps (GstBaseTransform * base, s = gst_caps_get_structure (othercaps, 0); gst_structure_fixate_field_nearest_int (s, "rate", rate); - return othercaps; + return gst_caps_fixate (othercaps); } static GstStructure * diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 729d9bdf8..58557bd23 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -535,7 +535,7 @@ gst_video_rate_fixate_caps (GstBaseTransform * trans, if ((par = gst_structure_get_value (s, "pixel-aspect-ratio"))) gst_structure_fixate_field_nearest_fraction (s, "pixel-aspect-ratio", 1, 1); - return othercaps; + return gst_caps_fixate (othercaps); } static gboolean diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index e7b82ec5f..fad74fcc7 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -1084,6 +1084,8 @@ gst_video_scale_fixate_caps (GstBaseTransform * base, GstPadDirection direction, } done: + othercaps = gst_caps_fixate (othercaps); + GST_DEBUG_OBJECT (base, "fixated othercaps to %" GST_PTR_FORMAT, othercaps); if (from_par == &fpar) |