Browse Source

Fix REBASE_PICTURE with h.264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.8
Michael Niedermayer 14 years ago
parent
commit
98fe404a94
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/mpegvideo.h

+ 4
- 1
libavcodec/mpegvideo.h View File

@@ -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);


Loading…
Cancel
Save