avpacket: Replace av_free_packet with av_packet_unref

`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
This commit is contained in:
Luca Barbato
2015-10-23 11:11:31 +02:00
parent a5d4204309
commit ce70f28a17
80 changed files with 174 additions and 158 deletions

View File

@@ -508,7 +508,7 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
if (res < 0) {
res = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF)\n");
av_free_packet(pkt);
av_packet_unref(pkt);
return res;
}
avpriv_atomic_int_add_and_fetch(&s->buffers_queued, 1);