From: Michael Niedermayer Date: Mon, 15 Dec 2014 20:27:05 +0000 (+0100) Subject: Merge commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1' X-Git-Tag: n2.6~1574 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=38c3ffbd55deb91622a58d8e20b15d263aadf131 Merge commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1' * commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1': mpegvideo: move REBASE_PICTURE where it is used Merged-by: Michael Niedermayer --- 38c3ffbd55deb91622a58d8e20b15d263aadf131 diff --cc libavcodec/h264_slice.c index 53f61caa7d,9169ff4a19..216e96394d --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@@ -443,11 -422,11 +443,11 @@@ static void clone_tables(H264Context *d } #define IN_RANGE(a, b, size) (((a) >= (b)) && ((a) < ((b) + (size)))) - #undef REBASE_PICTURE + #define REBASE_PICTURE(pic, new_ctx, old_ctx) \ - ((pic && pic >= old_ctx->DPB && \ - pic < old_ctx->DPB + H264_MAX_PICTURE_COUNT) ? \ - &new_ctx->DPB[pic - old_ctx->DPB] : NULL) + (((pic) && (pic) >= (old_ctx)->DPB && \ + (pic) < (old_ctx)->DPB + H264_MAX_PICTURE_COUNT) ? \ + &(new_ctx)->DPB[(pic) - (old_ctx)->DPB] : NULL) static void copy_picture_range(H264Picture **to, H264Picture **from, int count, H264Context *new_base,