Advertisement
Guest User

x264 Encode Leak Fix

a guest
Nov 26th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. encoder/encoder.c | 6 ++++++
  2. 1 file changed, 6 insertions(+)
  3.  
  4. diff --git a/encoder/encoder.c b/encoder/encoder.c
  5. index c87d79d..1d07c3c 100644
  6. --- a/encoder/encoder.c
  7. +++ b/encoder/encoder.c
  8. @@ -3258,7 +3258,10 @@ int x264_encoder_encode( x264_t *h,
  9. return -1;
  10.  
  11. if( x264_frame_copy_picture( h, fenc, pic_in ) < 0 )
  12. + {
  13. + x264_frame_push_unused( h, fenc );
  14. return -1;
  15. + }
  16.  
  17. if( h->param.i_width != 16 * h->mb.i_mb_width ||
  18. h->param.i_height != 16 * h->mb.i_mb_height )
  19. @@ -3299,7 +3302,10 @@ int x264_encoder_encode( x264_t *h,
  20. if( h->param.rc.b_mb_tree && h->param.rc.b_stat_read )
  21. {
  22. if( x264_macroblock_tree_read( h, fenc, pic_in->prop.quant_offsets ) )
  23. + {
  24. + x264_frame_push_unused( h, fenc );
  25. return -1;
  26. + }
  27. }
  28. else
  29. x264_stack_align( x264_adaptive_quant_frame, h, fenc, pic_in->prop.quant_offsets );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement