Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-09-23 20:49:01 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-09-23 20:50:05 +0300
commitd5554cdc7c900880571c4265c9f3f7a7cfec6071 (patch)
treecabcdd1ff0e751082dfc5462cb849ace7663eb24
parentd12f0d3f70322ef01eef6e8ec72f7fbaf5a191ba (diff)
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
-rw-r--r--source/blender/imbuf/intern/anim_movie.c4
1 files changed, 4 insertions, 0 deletions
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