[Bf-blender-cvs] [d5554cdc7c9] master: Fix T100741: Update FFMPEG Dimensions
Harley Acheson
noreply at git.blender.org
Fri Sep 23 19:50:15 CEST 2022
Commit: d5554cdc7c900880571c4265c9f3f7a7cfec6071
Author: Harley Acheson
Date: Fri Sep 23 10:49:01 2022 -0700
Branches: master
https://developer.blender.org/rBd5554cdc7c900880571c4265c9f3f7a7cfec6071
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
===================================================================
M 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
More information about the Bf-blender-cvs
mailing list