---
libavdevice/dv1394.c | 2 +-
libavdevice/v4l2.c | 8 ++++----
libavdevice/vfwcap.c | 10 +++++-----
libavdevice/x11grab.c | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c
index d259e1a..14646ae 100644
--- a/libavdevice/dv1394.c
+++ b/libavdevice/dv1394.c
@@ -206,7 +206,7 @@ static int dv1394_close(AVFormatContext * context)
av_log(context, AV_LOG_ERROR, "Failed to munmap DV1394 ring buffer:
%s\n", strerror(errno));
close(dv->fd);
- av_free(dv->dv_demux);
+ av_freep(&dv->dv_demux);
return 0;
}
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 302639d..088eb4a 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -373,7 +373,7 @@ static int mmap_init(AVFormatContext *ctx)
s->buf_len = av_malloc(sizeof(unsigned int) * s->buffers);
if (!s->buf_len) {
av_log(ctx, AV_LOG_ERROR, "Cannot allocate buffer sizes\n");
- av_free(s->buf_start);
+ av_freep(&s->buf_start);
return AVERROR(ENOMEM);
}
@@ -437,7 +437,7 @@ static void mmap_release_buffer(void *opaque, uint8_t *data)
buf.memory = V4L2_MEMORY_MMAP;
buf.index = buf_descriptor->index;
fd = buf_descriptor->fd;
- av_free(buf_descriptor);
+ av_freep(&buf_descriptor);
res = ioctl(fd, VIDIOC_QBUF, &buf);
if (res < 0) {
@@ -606,8 +606,8 @@ static void mmap_close(struct video_data *s)
for (i = 0; i < s->buffers; i++) {
munmap(s->buf_start[i], s->buf_len[i]);
}
- av_free(s->buf_start);
- av_free(s->buf_len);
+ av_freep(&s->buf_start);
+ av_freep(&s->buf_len);
}
static int v4l2_set_parameters(AVFormatContext *s1)
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index b47de1b..d0811f1 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -188,7 +188,7 @@ static LRESULT CALLBACK videostream_cb(HWND hwnd,
LPVIDEOHDR vdhdr)
goto fail;
if(av_new_packet(&pktl_next->pkt, vdhdr->dwBytesUsed) < 0) {
- av_free(pktl_next);
+ av_freep(&pktl_next);
goto fail;
}
@@ -228,7 +228,7 @@ static int vfw_read_close(AVFormatContext *s)
while (pktl) {
AVPacketList *next = pktl->next;
av_free_packet(&pktl->pkt);
- av_free(pktl);
+ av_freep(&pktl);
pktl = next;
}
@@ -344,7 +344,7 @@ static int vfw_read_header(AVFormatContext *s)
biCompression = bi->bmiHeader.biCompression;
biBitCount = bi->bmiHeader.biBitCount;
- av_free(bi);
+ av_freep(&bi);
/* Set sequence setup */
ret = SendMessage(ctx->hwnd, WM_CAP_GET_SEQUENCE_SETUP, sizeof(cparms),
@@ -416,7 +416,7 @@ static int vfw_read_header(AVFormatContext *s)
return 0;
fail_bi:
- av_free(bi);
+ av_freep(&bi);
fail_io:
vfw_read_close(s);
@@ -434,7 +434,7 @@ static int vfw_read_packet(AVFormatContext *s, AVPacket
*pkt)
if(ctx->pktl) {
*pkt = ctx->pktl->pkt;
ctx->pktl = ctx->pktl->next;
- av_free(pktl);
+ av_freep(&pktl);
}
ResetEvent(ctx->event);
ReleaseMutex(ctx->mutex);
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 3aa4294..a026781 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -358,7 +358,7 @@ static int x11grab_read_header(AVFormatContext *s1)
st->codec->bit_rate = x11grab->frame_size * 1 /
av_q2d(x11grab->time_base) * 8;
out:
- av_free(param);
+ av_freep(¶m);
return ret;
}
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel