mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +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)
|
||||
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.memory = V4L2_MEMORY_MMAP;
|
||||
buffer.index = 0;
|
||||
|
|
Loading…
Reference in a new issue