mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
mfc: Don't leak buffers when setting new dest settings for a direct buffer
This commit is contained in:
parent
21258a52cd
commit
817d30f130
1 changed files with 7 additions and 0 deletions
|
@ -439,6 +439,13 @@ fimc_set_dst_format_direct (Fimc * fimc, FimcColorFormat format, int width,
|
||||||
crop_top, crop_width, crop_height) < 0)
|
crop_top, crop_width, crop_height) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
for (i = 0; i < 3; i++) {
|
||||||
|
if (fimc->dst_buffer_data[i])
|
||||||
|
munmap (fimc->dst_buffer_data[i], fimc->dst_buffer_size[i]);
|
||||||
|
fimc->dst_buffer_data[i] = NULL;
|
||||||
|
fimc->dst_buffer_size[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
|
||||||
buffer.memory = V4L2_MEMORY_MMAP;
|
buffer.memory = V4L2_MEMORY_MMAP;
|
||||||
buffer.index = 0;
|
buffer.index = 0;
|
||||||
|
|
Loading…
Reference in a new issue