summaryrefslogtreecommitdiff
path: root/libavformat/yop.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-10-14 21:34:23 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-10-19 19:27:52 +0200
commite1a1b34a96470a871bffb68647687d84ccb33843 (patch)
treeb1c815e145165c2eef6bf0466e93a0c9602e0046 /libavformat/yop.c
parente7dcfd3a12500b12b51f266c12233097c94c5845 (diff)
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`.
Diffstat (limited to 'libavformat/yop.c')
-rw-r--r--libavformat/yop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 1e429d344a..933c57d757 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -168,14 +168,14 @@ static int yop_read_packet(AVFormatContext *s, AVPacket *pkt)
return yop->audio_block_length;
err_out:
- av_free_packet(&yop->video_packet);
+ av_packet_unref(&yop->video_packet);
return ret;
}
static int yop_read_close(AVFormatContext *s)
{
YopDecContext *yop = s->priv_data;
- av_free_packet(&yop->video_packet);
+ av_packet_unref(&yop->video_packet);
return 0;
}
@@ -200,7 +200,7 @@ static int yop_read_seek(AVFormatContext *s, int stream_index,
if (avio_seek(s->pb, frame_pos, SEEK_SET) < 0)
return -1;
- av_free_packet(&yop->video_packet);
+ av_packet_unref(&yop->video_packet);
yop->odd_frame = timestamp & 1;
return 0;