# HG changeset patch # User michaelni # Date 1036064878 0 # Node ID dfaa1c45bd27f835a6dda67da51eb1906945d9bb # Parent 607e867a8be49e4abcc2195c8d47259e54d9789b cleanup diff -r 607e867a8be4 -r dfaa1c45bd27 mpeg12.c --- a/mpeg12.c Thu Oct 31 10:21:44 2002 +0000 +++ b/mpeg12.c Thu Oct 31 11:47:58 2002 +0000 @@ -1613,7 +1613,6 @@ for(;;) { clear_blocks(s->block[0]); - emms_c(); ret = mpeg_decode_mb(s, s->block); dprintf("ret=%d\n", ret); @@ -1623,30 +1622,7 @@ MPV_decode_mb(s, s->block); if (++s->mb_x >= s->mb_width) { - if ( avctx->draw_horiz_band - && (s->num_available_buffers>=1 || (!s->has_b_frames)) ) { - UINT8 *src_ptr[3]; - int y, h, offset; - y = s->mb_y * 16; - h = s->height - y; - if (h > 16) - h = 16; - if(s->pict_type==B_TYPE) - offset = 0; - else - offset = y * s->linesize; - if(s->pict_type==B_TYPE || (!s->has_b_frames)){ - src_ptr[0] = s->current_picture[0] + offset; - src_ptr[1] = s->current_picture[1] + (offset >> 2); - src_ptr[2] = s->current_picture[2] + (offset >> 2); - } else { - src_ptr[0] = s->last_picture[0] + offset; - src_ptr[1] = s->last_picture[1] + (offset >> 2); - src_ptr[2] = s->last_picture[2] + (offset >> 2); - } - avctx->draw_horiz_band(avctx, src_ptr, s->linesize, - y, s->width, h); - } + ff_draw_horiz_band(s); s->mb_x = 0; s->mb_y++; diff -r 607e867a8be4 -r dfaa1c45bd27 mpegvideo.c --- a/mpegvideo.c Thu Oct 31 10:21:44 2002 +0000 +++ b/mpegvideo.c Thu Oct 31 11:47:58 2002 +0000 @@ -2147,6 +2147,8 @@ src_ptr[1] = s->last_picture[1] + (offset >> 2); src_ptr[2] = s->last_picture[2] + (offset >> 2); } + emms_c(); + s->avctx->draw_horiz_band(s->avctx, src_ptr, s->linesize, y, s->width, h); }