filter_units: Unref packet on failure

According to the API, the packet structure a bsf receives must not be
touched on failure, yet filter_units nevertheless did it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/316/head
Andreas Rheinhardt 6 years ago committed by Mark Thompson
parent 7549f0ac1b
commit 45fd7e44a4
  1. 2
      libavcodec/filter_units_bsf.c

@ -153,6 +153,8 @@ static int filter_units_filter(AVBSFContext *bsf, AVPacket *out)
goto fail;
fail:
if (err < 0)
av_packet_unref(out);
ff_cbs_fragment_reset(ctx->cbc, frag);
av_packet_free(&in);

Loading…
Cancel
Save