# HG changeset patch # User michael # Date 1259459443 0 # Node ID 46cb472ecc1ef134f66395de9445b710eb0786ae # Parent 69feacc1a220bd1f56cd4c31927c698aeca3fa35 Make sure field_select is not set to nonsensical values even if unused. Fixed an assert failure. diff -r 69feacc1a220 -r 46cb472ecc1e mpeg12.c --- a/mpeg12.c Sat Nov 28 23:17:46 2009 +0000 +++ b/mpeg12.c Sun Nov 29 01:50:43 2009 +0000 @@ -1847,7 +1847,7 @@ s->mv[0][0][0] = s->mv[0][0][1] = 0; s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; - s->field_select[0][0]= s->picture_structure - 1; + s->field_select[0][0]= (s->picture_structure - 1) & 1; } else { /* if B type, reuse previous vectors and directions */ s->mv[0][0][0] = s->last_mv[0][0][0];