mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
If AVPacket->data == NULL, the packet does not contain any buffer to
be freed. This fixes a double free on exit. Originally committed as revision 16857 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
73f184936d
commit
5449a787c9
1 changed files with 4 additions and 0 deletions
|
|
@ -325,6 +325,10 @@ static void mmap_release_buffer(AVPacket *pkt)
|
|||
int res, fd;
|
||||
struct buff_data *buf_descriptor = pkt->priv;
|
||||
|
||||
if (pkt->data == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
memset(&buf, 0, sizeof(struct v4l2_buffer));
|
||||
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
buf.memory = V4L2_MEMORY_MMAP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue