vlc | branch: master | Tristan Matthews <tma...@videolan.org> | Tue Apr 17 11:19:50 2018 -0400| [9a5730783526780b1368cab56557913c3f7ff1bb] | committer: Tristan Matthews
vpx: encoder: free existing blocks on allocation failure > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a5730783526780b1368cab56557913c3f7ff1bb --- modules/codec/vpx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c index 54a787ca74..643665023b 100644 --- a/modules/codec/vpx.c +++ b/modules/codec/vpx.c @@ -488,8 +488,9 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict) block_t *p_block = block_Alloc(pkt->data.frame.sz); if (unlikely(p_block == NULL)) { - vpx_img_free(&img); - return NULL; + block_ChainRelease(p_out); + p_out = NULL; + break; } memcpy(p_block->p_buffer, pkt->data.frame.buf, pkt->data.frame.sz); _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits