From da697df6ee2e166adc732925438d611963ca3a08 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Thu, 10 Jul 2014 02:53:12 +0200 Subject: [PATCH] AVIDump: fix FFV1 encoding ffmpeg 2.0 changed requirements for the FFV1 encoder and made them more strict, requiring more fields of the input frame to be initialized. Explicitly setting pixfmt, width and height solve the EINVAL issues with FFV1 encoding. Original fix from http://ffmpeg.org/pipermail/libav-user/2013-October/005759.html --- Source/Core/VideoCommon/AVIDump.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index c0e69fc6ab..15ffab639a 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -328,6 +328,10 @@ void AVIDump::AddFrame(const u8* data, int width, int height) height, s_scaled_frame->data, s_scaled_frame->linesize); } + s_scaled_frame->format = s_stream->codec->pix_fmt; + s_scaled_frame->width = s_width; + s_scaled_frame->height = s_height; + // Encode and write the image. AVPacket pkt; PreparePacket(&pkt);