avcodec/bsf: Unref the packet when flushing

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 <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-06 22:31:38 +02:00
parent b99fb4df42
commit bbc24363f1
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}