Commit f851c923 authored by Fiona Glaser's avatar Fiona Glaser

Fix crash in interlaced with >8 refs

Crash introduced in weightp.
parent 4aa33d65
......@@ -256,7 +256,7 @@ typedef struct
} ref_pic_list_order[2][16];
/* P-frame weighting */
x264_weight_t weight[16][3];
x264_weight_t weight[32][3];
int i_mmco_remove_from_end;
int i_mmco_command_count;
......
......@@ -1202,7 +1202,7 @@ static void x264_weighted_pred_init( x264_t *h )
// and duplicates of that frame.
h->fenc->i_lines_weighted = 0;
for( i_ref = 0; i_ref < h->i_ref0; i_ref++ )
for( i_ref = 0; i_ref < (h->i_ref0 << h->sh.b_mbaff); i_ref++ )
for( i = 0; i < 3; i++ )
h->sh.weight[i_ref][i].weightfn = NULL;
......
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