The documentation does not require the packet to be blank in this case (i.e. it can now contain opaque_ref), but it does contain that the contents will be reset upon success.
Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/bsf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 3420885e5f..212f398210 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -201,6 +201,8 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt) int ret; if (!pkt || IS_EMPTY(pkt)) { + if (pkt) + av_packet_unref(pkt); bsfi->eof = 1; return 0; } -- 2.30.2 _______________________________________________ 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".
