Mercurial > libavcodec.hg
comparison rv34.c @ 10563:93f1f9d9d847 libavcodec
Call avcodec_set_dimensions() instead of simply setting avctx->width/height
when frame dimensions change in RV3/4.
author | kostya |
---|---|
date | Tue, 24 Nov 2009 06:05:41 +0000 |
parents | e2d17f7f9408 |
children | da870c6f71ce |
comparison
equal
deleted
inserted
replaced
10562:51b5f85c5064 | 10563:93f1f9d9d847 |
---|---|
1283 | 1283 |
1284 if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { | 1284 if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) { |
1285 if(s->width != r->si.width || s->height != r->si.height){ | 1285 if(s->width != r->si.width || s->height != r->si.height){ |
1286 av_log(s->avctx, AV_LOG_DEBUG, "Changing dimensions to %dx%d\n", r->si.width,r->si.height); | 1286 av_log(s->avctx, AV_LOG_DEBUG, "Changing dimensions to %dx%d\n", r->si.width,r->si.height); |
1287 MPV_common_end(s); | 1287 MPV_common_end(s); |
1288 s->width = s->avctx->width = r->si.width; | 1288 s->width = r->si.width; |
1289 s->height = s->avctx->height = r->si.height; | 1289 s->height = r->si.height; |
1290 avcodec_set_dimensions(s->avctx, s->width, s->height); | |
1290 if(MPV_common_init(s) < 0) | 1291 if(MPV_common_init(s) < 0) |
1291 return -1; | 1292 return -1; |
1292 r->intra_types_stride = s->mb_width*4 + 4; | 1293 r->intra_types_stride = s->mb_width*4 + 4; |
1293 r->intra_types_hist = av_realloc(r->intra_types_hist, r->intra_types_stride * 4 * 2 * sizeof(*r->intra_types_hist)); | 1294 r->intra_types_hist = av_realloc(r->intra_types_hist, r->intra_types_stride * 4 * 2 * sizeof(*r->intra_types_hist)); |
1294 r->intra_types = r->intra_types_hist + r->intra_types_stride * 4; | 1295 r->intra_types = r->intra_types_hist + r->intra_types_stride * 4; |