[vlc-commits] vpx: encoder: don't leak image on encoding failure

Tristan Matthews git at videolan.org
Fri Jan 26 04:34:20 CET 2018


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Jan 25 15:37:32 2018 -0500| [b492a7ec69e200b01ec8ddd87bea07b8afe19886] | committer: Tristan Matthews

vpx: encoder: don't leak image on encoding failure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b492a7ec69e200b01ec8ddd87bea07b8afe19886
---

 modules/codec/vpx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index d626038ccc..76331a714b 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -478,6 +478,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
      flags, quality);
     if (res != VPX_CODEC_OK) {
         VPX_ERR(p_enc, ctx, "Failed to encode frame");
+        vpx_img_free(&img);
         return NULL;
     }
 



More information about the vlc-commits mailing list