# HG changeset patch # User diego # Date 1234749769 0 # Node ID 1b00a4a76adee2acf67b4a850d19f85f2edf8d1d # Parent c1fd3c6a8533ec221649f94f39ade3e1f9d2e8b3 Replace two asserts by checks and error messages. diff -r c1fd3c6a8533 -r 1b00a4a76ade mpegvideo_xvmc.c --- a/mpegvideo_xvmc.c Mon Feb 16 01:59:51 2009 +0000 +++ b/mpegvideo_xvmc.c Mon Feb 16 02:02:49 2009 +0000 @@ -312,11 +312,14 @@ } render->filled_mv_blocks_num++; - 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) + 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"); if (render->filled_mv_blocks_num == render->allocated_mv_blocks)