Commit 5d40e878 authored by Fiona Glaser's avatar Fiona Glaser
Browse files

Fix some invalid reads caught by valgrind

Temporal predictor calculation was misled by invalid reference counts for I-frames.
parent cde39046
......@@ -1339,8 +1339,11 @@ static inline void x264_reference_build_list( x264_t *h, int i_poc )
int b_ok;
/* build ref list 0/1 */
h->i_ref0 = 0;
h->i_ref1 = 0;
h->mb.pic.i_fref[0] = h->i_ref0 = 0;
h->mb.pic.i_fref[1] = h->i_ref1 = 0;
if( h->sh.i_type == SLICE_TYPE_I )
return;
for( i = 0; h->frames.reference[i]; i++ )
{
if( h->frames.reference[i]->i_poc < i_poc )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment