aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:28:56 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:28:56 +0100
commit7f5af80ba42bbd82da53dfd95236e9d47159a96a (patch)
treef85abbee087fa12065f02278c710ea4830c2cae5 /libavdevice
parent856b19d5935b544e96156f8e75e23b28c0a9f318 (diff)
parentce70f28a1732c74a9cd7fec2d56178750bd6e457 (diff)
downloadffmpeg-7f5af80ba42bbd82da53dfd95236e9d47159a96a.tar.gz
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/alsa_dec.c4
-rw-r--r--libavdevice/jack.c2
-rw-r--r--libavdevice/oss_dec.c2
-rw-r--r--libavdevice/sndio_dec.c2
-rw-r--r--libavdevice/v4l2.c2
-rw-r--r--libavdevice/vfwcap.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/libavdevice/alsa_dec.c b/libavdevice/alsa_dec.c
index b8e957a5e2..71a6ef4f4e 100644
--- a/libavdevice/alsa_dec.c
+++ b/libavdevice/alsa_dec.c
@@ -111,14 +111,14 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
while ((res = snd_pcm_readi(s->h, pkt->data, s->period_size)) < 0) {
if (res == -EAGAIN) {
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return AVERROR(EAGAIN);
}
if (ff_alsa_xrun_recover(s1, res) < 0) {
av_log(s1, AV_LOG_ERROR, "ALSA read error: %s\n",
snd_strerror(res));
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return AVERROR(EIO);
}
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index 917534d9ec..9ecbf9e32c 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -218,7 +218,7 @@ static void free_pkt_fifo(AVFifoBuffer **fifo)
AVPacket pkt;
while (av_fifo_size(*fifo)) {
av_fifo_generic_read(*fifo, &pkt, sizeof(pkt), NULL);
- av_free_packet(&pkt);
+ av_packet_unref(&pkt);
}
av_fifo_freep(fifo);
}
diff --git a/libavdevice/oss_dec.c b/libavdevice/oss_dec.c
index 156d6ae9a6..3a9a20a233 100644
--- a/libavdevice/oss_dec.c
+++ b/libavdevice/oss_dec.c
@@ -84,7 +84,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
ret = read(s->fd, pkt->data, pkt->size);
if (ret <= 0){
- av_free_packet(pkt);
+ av_packet_unref(pkt);
pkt->size = 0;
if (ret<0) return AVERROR(errno);
else return AVERROR_EOF;
diff --git a/libavdevice/sndio_dec.c b/libavdevice/sndio_dec.c
index f815b377fb..6f1160e0f0 100644
--- a/libavdevice/sndio_dec.c
+++ b/libavdevice/sndio_dec.c
@@ -67,7 +67,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
ret = sio_read(s->hdl, pkt->data, pkt->size);
if (ret == 0 || sio_eof(s->hdl)) {
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return AVERROR_EOF;
}
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 247b287689..fee0fb0e92 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -550,7 +550,7 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
res = enqueue_buffer(s, &buf);
if (res) {
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return res;
}
} else {
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index f536bc100f..e1f8b86699 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -234,7 +234,7 @@ static int vfw_read_close(AVFormatContext *s)
pktl = ctx->pktl;
while (pktl) {
AVPacketList *next = pktl->next;
- av_free_packet(&pktl->pkt);
+ av_packet_unref(&pktl->pkt);
av_free(pktl);
pktl = next;
}