On 9/6/2021 5:29 PM, Andreas Rheinhardt wrote:
The buffer_pkt is always unreferenced after being used and
is therefore always blank when avcodec_send_packet() is called.
It currently is always unreferenced after being used, but to prevent
someone mistakenly breaking that assumption, an av_assert could be added
in place of the unref call.
Signed-off-by: Andreas Rheinhardt <[email protected]>
---
libavcodec/decode.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 643f9d6a30..4def801516 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -587,7 +587,6 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext
*avctx, const AVPacke
if (avpkt && !avpkt->size && avpkt->data)
return AVERROR(EINVAL);
- av_packet_unref(avci->buffer_pkt);
if (avpkt && (avpkt->data || avpkt->side_data_elems)) {
ret = av_packet_ref(avci->buffer_pkt, avpkt);
if (ret < 0)
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".