avcodec/motion_est: Fix xy indexing on range violation in ff_get_best_fcode()

This codepath seems untested, no testcases change

Found-by: <mkver>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-02-08 21:38:50 +01:00
parent bf33a38499
commit 634312a70f
1 changed files with 1 additions and 2 deletions

View File

@ -1613,7 +1613,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
for(y=0; y<s->mb_height; y++){
int x;
int xy= y*s->mb_stride;
for(x=0; x<s->mb_width; x++){
for(x=0; x<s->mb_width; x++, xy++){
if(s->mb_type[xy] & type){
int mx= mv_table[xy][0];
int my= mv_table[xy][1];
@ -1630,7 +1630,6 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
score[j]-= 170;
}
}
xy++;
}
}