ffmpeg: Set frame's format, width and height from current context.

Fixes 12953.
This commit is contained in:
Dario Casalinuovo
2017-05-29 19:26:33 +02:00
parent b70a58f95a
commit ea5cc6995e
@@ -511,6 +511,11 @@ AVCodecEncoder::_OpenCodecIfNeeded()
fContext->strict_std_compliance = -2;
// Some codecs need this to be set before open
fFrame->format = fContext->pix_fmt;
fFrame->width = fContext->width;
fFrame->height = fContext->height;
// Open the codec
int result = avcodec_open2(fContext, fCodec, NULL);
if (result >= 0)