mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
v4l2: object: Handle video helper return value
gst_video_info_set_interlaced_format() can return an error if the width/height causes integer overflow. Handle this case, so that we can fail cleanly. This has been experienced while testing an in-progress driver. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5319>
This commit is contained in:
parent
bce3053598
commit
92820a8cf2
1 changed files with 3 additions and 2 deletions
|
@ -4350,8 +4350,9 @@ gst_v4l2_object_acquire_format (GstV4l2Object * v4l2object, GstVideoInfo * info)
|
|||
goto unsupported_field;
|
||||
}
|
||||
|
||||
gst_video_info_set_interlaced_format (info, format, interlace_mode, width,
|
||||
height);
|
||||
if (!gst_video_info_set_interlaced_format (info, format, interlace_mode,
|
||||
width, height))
|
||||
goto invalid_dimensions;
|
||||
|
||||
gst_v4l2_object_get_colorspace (v4l2object, &fmt, &info->colorimetry);
|
||||
gst_v4l2_object_get_streamparm (v4l2object, info);
|
||||
|
|
Loading…
Reference in a new issue