summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
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 /libavcodec/utils.c
parent856b19d5935b544e96156f8e75e23b28c0a9f318 (diff)
parentce70f28a1732c74a9cd7fec2d56178750bd6e457 (diff)
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 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index dfac790705..b4709cb3cb 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1693,7 +1693,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
*got_packet_ptr = 0;
if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) {
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
av_init_packet(avpkt);
return 0;
}
@@ -1799,7 +1799,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
}
if (ret < 0 || !*got_packet_ptr) {
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
av_init_packet(avpkt);
goto end;
}
@@ -1839,7 +1839,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
avctx->stats_out[0] = '\0';
if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) {
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
av_init_packet(avpkt);
avpkt->size = 0;
return 0;
@@ -1893,7 +1893,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
}
if (ret < 0 || !*got_packet_ptr)
- av_free_packet(avpkt);
+ av_packet_unref(avpkt);
emms_c();
return ret;