mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 01:31:03 +00:00
v4l2codecs: decoder: Fixed unset dimension in caps
When the driver does not implement ENUM_FRMESIZE for some specific formats, the caps limiting the sizes may endup empty, which results in assuming the driver can scale to any sizes. Ensure that the original size is in the caps to prevent this assumption. This happens with Hantro drive, since it only reply to that call if the format is postprocessed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7849>
This commit is contained in:
parent
1a9841582d
commit
61d2231c58
1 changed files with 3 additions and 1 deletions
|
@ -448,7 +448,9 @@ gst_v4l2_decoder_probe_caps_for_format (GstV4l2Decoder * self,
|
|||
caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING,
|
||||
gst_video_format_to_string (format), NULL);
|
||||
|
||||
size_caps = gst_caps_new_empty ();
|
||||
size_caps = gst_caps_new_simple ("video/x-raw",
|
||||
"width", G_TYPE_INT, unscaled_width,
|
||||
"height", G_TYPE_INT, unscaled_height, NULL);
|
||||
while ((tmp = gst_v4l2_decoder_enum_size_for_format (self, pixelformat,
|
||||
index++, unscaled_width, unscaled_height))) {
|
||||
size_caps = gst_caps_merge (size_caps, tmp);
|
||||
|
|
Loading…
Reference in a new issue