Mercurial > libavcodec.hg
comparison mpeg12.c @ 10593:46cb472ecc1e libavcodec
Make sure field_select is not set to nonsensical values even if unused.
Fixed an assert failure.
author | michael |
---|---|
date | Sun, 29 Nov 2009 01:50:43 +0000 |
parents | 69feacc1a220 |
children | 73779b8e6c5f |
comparison
equal
deleted
inserted
replaced
10592:69feacc1a220 | 10593:46cb472ecc1e |
---|---|
1845 /* if P type, zero motion vector is implied */ | 1845 /* if P type, zero motion vector is implied */ |
1846 s->mv_dir = MV_DIR_FORWARD; | 1846 s->mv_dir = MV_DIR_FORWARD; |
1847 s->mv[0][0][0] = s->mv[0][0][1] = 0; | 1847 s->mv[0][0][0] = s->mv[0][0][1] = 0; |
1848 s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; | 1848 s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; |
1849 s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; | 1849 s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; |
1850 s->field_select[0][0]= s->picture_structure - 1; | 1850 s->field_select[0][0]= (s->picture_structure - 1) & 1; |
1851 } else { | 1851 } else { |
1852 /* if B type, reuse previous vectors and directions */ | 1852 /* if B type, reuse previous vectors and directions */ |
1853 s->mv[0][0][0] = s->last_mv[0][0][0]; | 1853 s->mv[0][0][0] = s->last_mv[0][0][0]; |
1854 s->mv[0][0][1] = s->last_mv[0][0][1]; | 1854 s->mv[0][0][1] = s->last_mv[0][0][1]; |
1855 s->mv[1][0][0] = s->last_mv[1][0][0]; | 1855 s->mv[1][0][0] = s->last_mv[1][0][0]; |