comparison mpegvideo_xvmc.c @ 8960:a8c7a467a287 libavcodec

Revert converting two asserts into if checks and error messages. It did not achieve the intended effect.
author diego
date Tue, 17 Feb 2009 23:35:41 +0000
parents 5e70bdb97d0c
children 22227c45a1fd
comparison
equal deleted inserted replaced
8959:07b5c9735954 8960:a8c7a467a287
314 render->next_free_data_block_num++; 314 render->next_free_data_block_num++;
315 } 315 }
316 } 316 }
317 render->filled_mv_blocks_num++; 317 render->filled_mv_blocks_num++;
318 318
319 319 assert(render->filled_mv_blocks_num <= render->allocated_mv_blocks);
320 if (render->filled_mv_blocks_num > render->allocated_mv_blocks) 320 assert(render->next_free_data_block_num <= render->allocated_data_blocks);
321 av_log(s->avctx, AV_LOG_ERROR, 321 /* The above conditions should not be able to fail as long as this function
322 "Not enough space to store mv blocks allocated.\n"); 322 * is used and the following 'if ()' automatically calls a callback to free
323 323 * blocks. */
324 if (render->next_free_data_block_num > render->allocated_data_blocks)
325 av_log(s->avctx, AV_LOG_ERROR,
326 "Offset to next data block exceeds number of allocated data blocks.\n");
327 324
328 325
329 if (render->filled_mv_blocks_num == render->allocated_mv_blocks) 326 if (render->filled_mv_blocks_num == render->allocated_mv_blocks)
330 ff_draw_horiz_band(s, 0, 0); 327 ff_draw_horiz_band(s, 0, 0);
331 } 328 }