aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/bsf.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-06 22:31:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-14 13:41:34 +0200
commitbbc24363f137377376cea59a48affe7c556b8c30 (patch)
treec7ed9d2ef24b7fd567e1dc41e93ebab3d4826819 /libavcodec/bsf.c
parentb99fb4df42871e16077c3248ab9cfd8cfd034a85 (diff)
downloadffmpeg-bbc24363f137377376cea59a48affe7c556b8c30.tar.gz
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>
Diffstat (limited to 'libavcodec/bsf.c')
-rw-r--r--libavcodec/bsf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
index 62fe7ae5e8..8ba021cb47 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;
}