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

Tristan Matthews git at videolan.org
Fri Jan 26 14:27:12 CET 2018


vlc/vlc-3.0 | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Jan 25 15:37:32 2018 -0500| [2de1b0a3126cb93554430b81d595e94fd3cbee32] | committer: Jean-Baptiste Kempf

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

(cherry picked from commit b492a7ec69e200b01ec8ddd87bea07b8afe19886)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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