mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-04 01:30:05 +02:00
Thoroughly check all fields set by the application in xvmc struct.
Originally committed as revision 17387 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7846418bdb
commit
649c171aec
@ -90,7 +90,11 @@ int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (render->allocated_mv_blocks < 1 ||
|
if (render->allocated_mv_blocks < 1 ||
|
||||||
render->allocated_data_blocks < mb_block_count) {
|
render->allocated_data_blocks < render->allocated_mv_blocks*mb_block_count ||
|
||||||
|
render->start_mv_blocks_num >= render->allocated_mv_blocks ||
|
||||||
|
render->next_free_data_block_num >
|
||||||
|
render->allocated_data_blocks -
|
||||||
|
mb_block_count*(render->allocated_mv_blocks-render->start_mv_blocks_num)) {
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
"Rendering surface doesn't provide enough block structures to work with.\n");
|
"Rendering surface doesn't provide enough block structures to work with.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user