aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavcodec/encode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index dd50486bcf..c152228c92 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -227,6 +227,7 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
+ av_packet_unref(avpkt);
*avpkt = tmp;
}
}
@@ -325,6 +326,7 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
ret = av_packet_ref(&tmp, avpkt);
if (ret < 0)
return ret;
+ av_packet_unref(avpkt);
*avpkt = tmp;
}
}