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>
This commit is contained in:
Andreas Rheinhardt 2019-06-17 05:42:08 +02:00 committed by Mark Thompson
parent 7549f0ac1b
commit 45fd7e44a4

View File

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