mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
v4l2: Set pixel-aspect-ratio to 1/1
We don't currently support setting the pixel-aspect-ratio from V4L2. So simply set it to be 1/1 in the caps to prevent negotiation failures when fixating to weird values (e.g. when the downstream caps has pixel-aspect-ratio = [ MIN, MAX ] ) https://bugzilla.gnome.org/show_bug.cgi?id=663580
This commit is contained in:
parent
d6a9de9e2a
commit
e7ae593993
1 changed files with 4 additions and 1 deletions
|
@ -1719,7 +1719,8 @@ return_data:
|
||||||
s = gst_structure_copy (template);
|
s = gst_structure_copy (template);
|
||||||
gst_structure_set (s, "width", G_TYPE_INT, (gint) width,
|
gst_structure_set (s, "width", G_TYPE_INT, (gint) width,
|
||||||
"height", G_TYPE_INT, (gint) height,
|
"height", G_TYPE_INT, (gint) height,
|
||||||
"interlaced", G_TYPE_BOOLEAN, interlaced, NULL);
|
"interlaced", G_TYPE_BOOLEAN, interlaced,
|
||||||
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, NULL);
|
||||||
|
|
||||||
if (G_IS_VALUE (&rates)) {
|
if (G_IS_VALUE (&rates)) {
|
||||||
/* only change the framerate on the template when we have a valid probed new
|
/* only change the framerate on the template when we have a valid probed new
|
||||||
|
@ -1980,6 +1981,8 @@ default_frame_sizes:
|
||||||
gst_structure_set (tmp, "height", GST_TYPE_INT_RANGE, min_h, max_h, NULL);
|
gst_structure_set (tmp, "height", GST_TYPE_INT_RANGE, min_h, max_h, NULL);
|
||||||
|
|
||||||
gst_structure_set (tmp, "interlaced", G_TYPE_BOOLEAN, interlaced, NULL);
|
gst_structure_set (tmp, "interlaced", G_TYPE_BOOLEAN, interlaced, NULL);
|
||||||
|
gst_structure_set (tmp, "pixel-aspect-ratio",
|
||||||
|
GST_TYPE_FRACTION, 1, 1, NULL);
|
||||||
|
|
||||||
gst_caps_append_structure (ret, tmp);
|
gst_caps_append_structure (ret, tmp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue