mirror of https://git.ffmpeg.org/ffmpeg.git
Replace two asserts by checks and error messages.
Originally committed as revision 17362 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e7c88eb76f
commit
f9d5bf3c2d
|
@ -312,11 +312,14 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
|
||||||
}
|
}
|
||||||
render->filled_mv_blocks_num++;
|
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);
|
if (render->filled_mv_blocks_num > render->allocated_mv_blocks)
|
||||||
/* The above conditions should not be able to fail as long as this function
|
av_log(s->avctx, AV_LOG_ERROR,
|
||||||
* is used and the following 'if ()' automatically calls a callback to free
|
"Not enough space to store mv blocks allocated.\n");
|
||||||
* blocks. */
|
|
||||||
|
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)
|
if (render->filled_mv_blocks_num == render->allocated_mv_blocks)
|
||||||
|
|
Loading…
Reference in New Issue