Commit 98fe404a authored by Michael Niedermayer's avatar Michael Niedermayer

Fix REBASE_PICTURE with h.264

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b5ef6f8e
......@@ -686,7 +686,10 @@ typedef struct MpegEncContext {
void (*denoise_dct)(struct MpegEncContext *s, DCTELEM *block);
} MpegEncContext;
#define REBASE_PICTURE(pic, new_ctx, old_ctx) (pic ? &new_ctx->picture[pic - old_ctx->picture] : NULL)
#define REBASE_PICTURE(pic, new_ctx, old_ctx) (pic ? \
(pic >= old_ctx->picture && pic < old_ctx->picture+old_ctx->picture_count ?\
&new_ctx->picture[pic - old_ctx->picture] : pic - (Picture*)old_ctx + (Picture*)new_ctx)\
: NULL)
void MPV_decode_defaults(MpegEncContext *s);
int MPV_common_init(MpegEncContext *s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment