summaryrefslogtreecommitdiff
path: root/libavcodec/libopusenc.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:35:30 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-27 14:35:30 +0100
commitc2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4 (patch)
treefd5a76e51fa3eb2b90deafbb6c0c48a127be42a9 /libavcodec/libopusenc.c
parent7f5af80ba42bbd82da53dfd95236e9d47159a96a (diff)
Replace remaining occurances of av_free_packet with av_packet_unref
Diffstat (limited to 'libavcodec/libopusenc.c')
-rw-r--r--libavcodec/libopusenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index 8ac02f9520..3f3e80d4a0 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -361,7 +361,7 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
discard_padding = opus->opts.packet_size - avpkt->duration;
// Check if subtraction resulted in an overflow
if ((discard_padding < opus->opts.packet_size) != (avpkt->duration > 0)) {
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
av_free(avpkt);
return AVERROR(EINVAL);
}
@@ -370,7 +370,7 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
AV_PKT_DATA_SKIP_SAMPLES,
10);
if(!side_data) {
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
av_free(avpkt);
return AVERROR(ENOMEM);
}