diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 21:15:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-10 21:25:33 +0100 |
commit | 111456682f555577747de2d81901cf07b0e717b5 (patch) | |
tree | e1f83b07f53d358d7c9b49f1e6406eba6dd2bba5 /libavcodec | |
parent | d3b25383daffac154846daeb4e4fb46569e728db (diff) | |
download | ffmpeg-111456682f555577747de2d81901cf07b0e717b5.tar.gz |
avcodec/mpegvideo: Fix undefined shifts in ff_init_block_index()
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 72e7eda36b..64ee632e59 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -3313,9 +3313,9 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename s->block_index[5]= s->mb_stride*(s->mb_y + s->mb_height + 2) + s->b8_stride*s->mb_height*2 + s->mb_x - 1; //block_index is not used by mpeg2, so it is not affected by chroma_format - s->dest[0] = s->current_picture.f->data[0] + ((s->mb_x - 1) << mb_size); - s->dest[1] = s->current_picture.f->data[1] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); - s->dest[2] = s->current_picture.f->data[2] + ((s->mb_x - 1) << (mb_size - s->chroma_x_shift)); + s->dest[0] = s->current_picture.f->data[0] + (int)((s->mb_x - 1U) << mb_size); + s->dest[1] = s->current_picture.f->data[1] + (int)((s->mb_x - 1U) << (mb_size - s->chroma_x_shift)); + s->dest[2] = s->current_picture.f->data[2] + (int)((s->mb_x - 1U) << (mb_size - s->chroma_x_shift)); if(!(s->pict_type==AV_PICTURE_TYPE_B && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME)) { |