mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
gstv4l2transform: format fixation for preferring passthrough
* If outgoing format is unfixated, try to set it to input format. * Call gst_caps_fixate () at end of fixation routine https://bugzilla.gnome.org/show_bug.cgi?id=766719
This commit is contained in:
parent
3eeef5fa09
commit
5829f326b0
1 changed files with 14 additions and 0 deletions
|
@ -428,6 +428,17 @@ gst_v4l2_transform_fixate_caps (GstBaseTransform * trans,
|
|||
ins = gst_caps_get_structure (caps, 0);
|
||||
outs = gst_caps_get_structure (othercaps, 0);
|
||||
|
||||
{
|
||||
const gchar *in_format;
|
||||
|
||||
in_format = gst_structure_get_string (ins, "format");
|
||||
if (in_format) {
|
||||
/* Try to set output format for pass through */
|
||||
gst_structure_fixate_field_string (outs, "format", in_format);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
from_par = gst_structure_get_value (ins, "pixel-aspect-ratio");
|
||||
to_par = gst_structure_get_value (outs, "pixel-aspect-ratio");
|
||||
|
||||
|
@ -847,6 +858,9 @@ done:
|
|||
if (to_par == &tpar)
|
||||
g_value_unset (&tpar);
|
||||
|
||||
/* fixate remaining fields */
|
||||
othercaps = gst_caps_fixate (othercaps);
|
||||
|
||||
return othercaps;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue