indeo5: change AVCodecContext w/h when internal ones change.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d2a6074359
commit
874ac0b1fd
@ -797,6 +797,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
if (ctx->frame.data[0])
|
if (ctx->frame.data[0])
|
||||||
avctx->release_buffer(avctx, &ctx->frame);
|
avctx->release_buffer(avctx, &ctx->frame);
|
||||||
|
|
||||||
|
if( avctx->width != ctx->planes[0].width
|
||||||
|
|| avctx->height != ctx->planes[0].height)
|
||||||
|
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
|
||||||
|
|
||||||
ctx->frame.reference = 0;
|
ctx->frame.reference = 0;
|
||||||
if (avctx->get_buffer(avctx, &ctx->frame) < 0) {
|
if (avctx->get_buffer(avctx, &ctx->frame) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user