提交 5449a787 编写于 作者: L Luca Abeni

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
上级 73f18493
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册