Mercurial > libavcodec.hg
changeset 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 | 07b5c9735954 |
children | 22227c45a1fd |
files | mpegvideo_xvmc.c |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo_xvmc.c Tue Feb 17 23:30:07 2009 +0000 +++ b/mpegvideo_xvmc.c Tue Feb 17 23:35:41 2009 +0000 @@ -316,14 +316,11 @@ } render->filled_mv_blocks_num++; - - if (render->filled_mv_blocks_num > render->allocated_mv_blocks) - av_log(s->avctx, AV_LOG_ERROR, - "Not enough space to store mv blocks allocated.\n"); - - if (render->next_free_data_block_num > render->allocated_data_blocks) - av_log(s->avctx, AV_LOG_ERROR, - "Offset to next data block exceeds number of allocated data blocks.\n"); + assert(render->filled_mv_blocks_num <= render->allocated_mv_blocks); + assert(render->next_free_data_block_num <= render->allocated_data_blocks); + /* The above conditions should not be able to fail as long as this function + * is used and the following 'if ()' automatically calls a callback to free + * blocks. */ if (render->filled_mv_blocks_num == render->allocated_mv_blocks)