diff options
author | Diego Biurrun <diego@biurrun.de> | 2009-02-16 02:02:49 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-02-16 02:02:49 +0000 |
commit | f9d5bf3c2de8b0753f8da1546021ec7a06859820 (patch) | |
tree | edc2d1144c7bfa8a9b0155de528bd1c75545cafc | |
parent | e7c88eb76f3754b37852e0dd7fb143ce83758358 (diff) | |
download | ffmpeg-f9d5bf3c2de8b0753f8da1546021ec7a06859820.tar.gz |
Replace two asserts by checks and error messages.
Originally committed as revision 17362 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo_xvmc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c index 7815740481..06c7bfc329 100644 --- a/libavcodec/mpegvideo_xvmc.c +++ b/libavcodec/mpegvideo_xvmc.c @@ -312,11 +312,14 @@ void ff_xvmc_decode_mb(MpegEncContext *s) } 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) |