ref: 72ef1949388c4c0d82769ef06c6db0195b124b13
parent: ba172ff0a587d8f47587c478b368c1ea33829a79
author: Yaowu Xu <[email protected]>
date: Fri Oct 3 12:14:49 EDT 2014
Change the y4m buffer allocation size This attempts to fix issue #847 Change-Id: Ifa2f96b6b33624004272d83363e089b5b4dc5626
--- a/y4minput.c
+++ b/y4minput.c
@@ -975,9 +975,9 @@
+ 2 * ((_y4m->pic_w + _y4m->dst_c_dec_h - 1) / _y4m->dst_c_dec_h) *
((_y4m->pic_h + _y4m->dst_c_dec_v - 1) / _y4m->dst_c_dec_v);
if (_y4m->bit_depth == 8)
- _y4m->dst_buf = (unsigned char *)malloc(_y4m->dst_buf_sz);
+ _y4m->dst_buf = (unsigned char *)malloc(_y4m->dst_buf_read_sz);
else
- _y4m->dst_buf = (unsigned char *)malloc(2 * _y4m->dst_buf_sz);
+ _y4m->dst_buf = (unsigned char *)malloc(2 * _y4m->dst_buf_read_sz);
if (_y4m->aux_buf_sz > 0)
_y4m->aux_buf = (unsigned char *)malloc(_y4m->aux_buf_sz);