diff options
Diffstat (limited to 'source/blender/imbuf/intern/anim_movie.c')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index b9500c2f798..c07326c1237 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -418,6 +418,7 @@ static int startffmpeg(struct anim * anim) { int frs_num; double frs_den; int streamcount; + int width, height; #ifdef FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT /* The following for color space determination */ @@ -474,6 +475,9 @@ static int startffmpeg(struct anim * anim) { pCodecCtx->workaround_bugs = 1; + width = pCodecCtx->width; + height = pCodecCtx->height; + if(avcodec_open(pCodecCtx, pCodec) < 0) { av_close_input_file(pFormatCtx); return -1; @@ -498,8 +502,8 @@ static int startffmpeg(struct anim * anim) { anim->params = 0; - anim->x = pCodecCtx->width; - anim->y = pCodecCtx->height; + anim->x = width; + anim->y = height; anim->interlacing = 0; anim->orientation = 0; anim->framesize = anim->x * anim->y * 4; |