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>
pull/366/head
Andreas Rheinhardt 3 years ago
parent b99fb4df42
commit bbc24363f1
  1. 2
      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;
}

Loading…
Cancel
Save