mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
truemotion1: stop using deprecated avcodec_set_dimensions
This commit is contained in:
parent
c265b8bb76
commit
db92e4ea8d
@ -397,15 +397,16 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
|
||||
new_pix_fmt = AV_PIX_FMT_RGB555; // RGB565 is supported as well
|
||||
|
||||
s->w >>= width_shift;
|
||||
if ((ret = av_image_check_size(s->w, s->h, 0, s->avctx)) < 0)
|
||||
return ret;
|
||||
|
||||
if (s->w != s->avctx->width || s->h != s->avctx->height ||
|
||||
new_pix_fmt != s->avctx->pix_fmt) {
|
||||
av_frame_unref(&s->frame);
|
||||
s->avctx->sample_aspect_ratio = (AVRational){ 1 << width_shift, 1 };
|
||||
s->avctx->pix_fmt = new_pix_fmt;
|
||||
avcodec_set_dimensions(s->avctx, s->w, s->h);
|
||||
|
||||
if ((ret = ff_set_dimensions(s->avctx, s->w, s->h)) < 0)
|
||||
return ret;
|
||||
|
||||
av_fast_malloc(&s->vert_pred, &s->vert_pred_size, s->avctx->width * sizeof(unsigned int));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user