You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
ffv1dec: call ff_get_format if width and height change
This commit is contained in:
@@ -139,6 +139,7 @@ typedef struct FFV1Context {
|
|||||||
uint32_t crcref;
|
uint32_t crcref;
|
||||||
enum AVPixelFormat pix_fmt;
|
enum AVPixelFormat pix_fmt;
|
||||||
enum AVPixelFormat configured_pix_fmt;
|
enum AVPixelFormat configured_pix_fmt;
|
||||||
|
int configured_width, configured_height;
|
||||||
|
|
||||||
const AVFrame *cur_enc_frame;
|
const AVFrame *cur_enc_frame;
|
||||||
int plane_count;
|
int plane_count;
|
||||||
|
|||||||
@@ -507,11 +507,15 @@ static int read_header(FFV1Context *f, RangeCoder *c)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (f->configured_pix_fmt != f->pix_fmt) {
|
if (f->configured_pix_fmt != f->pix_fmt ||
|
||||||
|
f->configured_width != f->avctx->width ||
|
||||||
|
f->configured_height != f->avctx->height) {
|
||||||
f->avctx->pix_fmt = get_pixel_format(f);
|
f->avctx->pix_fmt = get_pixel_format(f);
|
||||||
if (f->avctx->pix_fmt < 0)
|
if (f->avctx->pix_fmt < 0)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
f->configured_pix_fmt = f->pix_fmt;
|
f->configured_pix_fmt = f->pix_fmt;
|
||||||
|
f->configured_width = f->avctx->width;
|
||||||
|
f->configured_height = f->avctx->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_dlog(f->avctx, "%d %d %d\n",
|
ff_dlog(f->avctx, "%d %d %d\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user