diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index 6a923d9957..e2ab276c2e 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -328,11 +328,14 @@ static int vfw_read_header(AVFormatContext *s) } if (ctx->video_size) { - ret = av_parse_video_size(&bi->bmiHeader.biWidth, &bi->bmiHeader.biHeight, ctx->video_size); + int w, h; + ret = av_parse_video_size(&w, &h, ctx->video_size); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n"); goto fail; } + bi->bmiHeader.biWidth = w; + bi->bmiHeader.biHeight = h; } if (0) {