From d5554cdc7c900880571c4265c9f3f7a7cfec6071 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 23 Sep 2022 10:49:01 -0700 Subject: Fix T100741: Update FFMPEG Dimensions Update the animation's dimensions within ffmpeg_fetchibuf in case it has changed because of dynamic resolution (possible with WebM). Differential Revision: https://developer.blender.org/D15842 Reviewed by Richard Antalik --- source/blender/imbuf/intern/anim_movie.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/imbuf/intern/anim_movie.c') diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 4e6a52f8464..36ebe2b7cff 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -1406,6 +1406,10 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, IMB_Timecode_Typ ffmpeg_decode_video_frame_scan(anim, pts_to_search); + /* Update resolution as it can change per-frame with WebM. See T100741 & T100081. */ + anim->x = anim->pCodecCtx->width; + anim->y = anim->pCodecCtx->height; + IMB_freeImBuf(anim->cur_frame_final); /* Certain versions of FFmpeg have a bug in libswscale which ends up in crash -- cgit v1.2.3