[FFmpeg-cvslog] r17317 - trunk/libavcodec/mpegvideo_xvmc.c
Diego Biurrun
diego
Sun Feb 15 17:29:42 CET 2009
On Sun, Feb 15, 2009 at 11:06:24AM +0100, iive wrote:
>
> Log:
> Check all critical xvmc struct fields in ff_xvmc_field_start()
> and log error if they are not correct. All other functions
> are supposedly called after that one, so use assert() for them.
>
> --- trunk/libavcodec/mpegvideo_xvmc.c Sun Feb 15 10:04:08 2009 (r17316)
> +++ trunk/libavcodec/mpegvideo_xvmc.c Sun Feb 15 11:06:23 2009 (r17317)
> @@ -67,20 +65,37 @@ void ff_xvmc_pack_pblocks(MpegEncContext
>
> - if (!render || render->magic_id != AV_XVMC_RENDER_MAGIC)
> + if (!render || render->magic_id != AV_XVMC_RENDER_MAGIC ||
> + !render->data_blocks || !render->mv_blocks){
not K&R, missing space before {
> if (render->filled_mv_blocks_num) {
> av_log(avctx, AV_LOG_ERROR,
> - "Rendering surface contains %i unprocessed blocks\n",
> + "Rendering surface contains %i unprocessed blocks.\n",
> render->filled_mv_blocks_num);
unrelated cosmetics
> + if (render->total_number_of_mv_blocks < 1 ||
> + render->total_number_of_data_blocks < mb_block_count) {
> + av_log(avctx, AV_LOG_ERROR,
> + "Rendering surface doesn't provide enough block structures to work with.\n");
> + return -1;
> + }
> + if (render->total_number_of_mv_blocks < 1 ||
> + render->total_number_of_data_blocks < mb_block_count) {
> + av_log(avctx, AV_LOG_ERROR,
> + "Rendering surface doesn't provide enough block structures to work with.\n");
> + return -1;
> + }
10l: This hunk is duplicated.
Diego
More information about the ffmpeg-cvslog
mailing list