Some function calls may fail after the output packet is initialized.
Signed-off-by: James Almer <[email protected]>
---
libavcodec/h265_metadata_bsf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c
index 8759e410f3..59ea67f718 100644
--- a/libavcodec/h265_metadata_bsf.c
+++ b/libavcodec/h265_metadata_bsf.c
@@ -324,6 +324,8 @@ static int h265_metadata_filter(AVBSFContext *bsf, AVPacket
*out)
fail:
ff_cbs_fragment_uninit(ctx->cbc, au);
+ if (err < 0)
+ av_packet_unref(&out);
av_packet_free(&in);
return err;
--
2.16.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel