Skip to content

Commit

Permalink
videorate/videoscale/audioresample: Ensure that the caps returned fro…
Browse files Browse the repository at this point in the history
…m 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/799>
  • Loading branch information
sdroege authored and GStreamer Merge Bot committed Aug 26, 2020
1 parent d74b9f5 commit 3edf390
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gst/audioresample/gstaudioresample.c
Expand Up @@ -362,7 +362,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 *
Expand Down
2 changes: 1 addition & 1 deletion gst/videorate/gstvideorate.c
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions gst/videoscale/gstvideoscale.c
Expand Up @@ -1149,6 +1149,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)
Expand Down

0 comments on commit 3edf390

Please sign in to comment.