[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] haiku: hrev51191 - src/add-ons/media/plugins/ffmpeg
From:       b.vitruvio () gmail ! com
Date:       2017-05-29 17:31:55
Message-ID: 20170529173156.8861E5C2779 () vmrepo ! haiku-os ! org
[Download RAW message or body]

hrev51191 adds 1 changeset to branch 'master'
old head: b70a58f95a3a09efdb3343b8775015ef1e913da6
new head: ea5cc6995ed45b3b9f4723ebb0f74eb84bab5c9e
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=ea5cc6995ed4+%5Eb70a58f95a3a

----------------------------------------------------------------------------

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

                                [ Dario Casalinuovo <b.vitruvio@gmail.com> ]

----------------------------------------------------------------------------

Revision:    hrev51191
Commit:      ea5cc6995ed45b3b9f4723ebb0f74eb84bab5c9e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=ea5cc6995ed4
Author:      Dario Casalinuovo <b.vitruvio@gmail.com>
Date:        Mon May 29 17:26:23 2017 UTC

----------------------------------------------------------------------------

1 file changed, 5 insertions(+)
src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp | 5 +++++

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp \
b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp index 7e9476c..c6608cb 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVCodecEncoder.cpp
@@ -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)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic