OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73f1849
)
If AVPacket->data == NULL, the packet does not contain any buffer to
author
Luca Abeni
<lucabe72@email.it>
Fri, 30 Jan 2009 12:41:44 +0000
(12:41 +0000)
committer
Luca Abeni
<lucabe72@email.it>
Fri, 30 Jan 2009 12:41:44 +0000
(12:41 +0000)
be freed.
This fixes a double free on exit.
Originally committed as revision 16857 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavdevice/v4l2.c
patch
|
blob
|
history
diff --git
a/libavdevice/v4l2.c
b/libavdevice/v4l2.c
index
b5f7db2
..
819b6a5
100644
(file)
--- a/
libavdevice/v4l2.c
+++ b/
libavdevice/v4l2.c
@@
-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;