Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avpacket.c4
-rw-r--r--libavcodec/libopusenc.c4
-rw-r--r--libavcodec/libvpxenc.c2
-rw-r--r--libavcodec/utils.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 648dc10076..a87150ed82 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -179,7 +179,7 @@ static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup)
return 0;
failed_alloc:
- av_free_packet(pkt);
+ av_packet_unref(pkt);
return AVERROR(ENOMEM);
}
@@ -342,7 +342,7 @@ int av_packet_merge_side_data(AVPacket *pkt){
bytestream_put_be64(&p, FF_MERGE_MARKER);
av_assert0(p-pkt->data == pkt->size);
memset(p, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- av_free_packet(&old);
+ av_packet_unref(&old);
pkt->side_data_elems = 0;
pkt->side_data = NULL;
return 1;
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);
}
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 992122c982..887cc33c20 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -733,7 +733,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
cx_frame->sz_alpha + 8);
if(!side_data) {
- av_free_packet(pkt);
+ av_packet_unref(pkt);
av_free(pkt);
return AVERROR(ENOMEM);
}
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b4709cb3cb..dca0c9a32c 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2353,7 +2353,7 @@ static int recode_subtitle(AVCodecContext *avctx,
ret = FFMIN(AVERROR(errno), -1);
av_log(avctx, AV_LOG_ERROR, "Unable to recode subtitle event \"%s\" "
"from %s to UTF-8\n", inpkt->data, avctx->sub_charenc);
- av_free_packet(&tmp);
+ av_packet_unref(&tmp);
goto end;
}
outpkt->size -= outl;
@@ -2460,7 +2460,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
pkt_recoded.side_data = NULL;
pkt_recoded.side_data_elems = 0;
- av_free_packet(&pkt_recoded);
+ av_packet_unref(&pkt_recoded);
}
if (avctx->codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB)
sub->format = 0;