mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
v4l2object: Update image size when extrapolating
Update the image size according the amount of data we are going to read/write. This workaround bugs in driver where the sizeimage provided by TRY/S_FMT represent the buffer length (maximum size) rather then the expected bytesused (buffer size). https://bugzilla.gnome.org/show_bug.cgi?id=775564
This commit is contained in:
parent
b460f18f17
commit
0b83e4ceaf
1 changed files with 7 additions and 0 deletions
|
@ -2963,6 +2963,13 @@ gst_v4l2_object_extrapolate_info (GstV4l2Object * v4l2object,
|
|||
"stride %d, offset %" G_GSIZE_FORMAT, i, stride, info->stride[i],
|
||||
info->offset[i]);
|
||||
}
|
||||
|
||||
/* Update the image size according the amount of data we are going to
|
||||
* read/write. This workaround bugs in driver where the sizeimage provided
|
||||
* by TRY/S_FMT represent the buffer length (maximum size) rather then the expected
|
||||
* bytesused (buffer size). */
|
||||
if (offs < info->size)
|
||||
info->size = offs;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue