ffmpeg: Set frame's format, width and height from current context.
Fixes 12953.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user