[haiku-commits] r39037 - haiku/trunk/src/add-ons/media/plugins/ffmpeg

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 21 Oct 2010 00:01:24 +0200 (CEST)

Author: stippi
Date: 2010-10-21 00:01:24 +0200 (Thu, 21 Oct 2010)
New Revision: 39037
Changeset: http://dev.haiku-os.org/changeset/39037

Modified:
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp
Log:
Fix crash introduced as a last minute change... need to
find a way to do this properly, though. The pixel format
selected by AVCodecEncoder should match here.


Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp     
2010-10-20 21:40:35 UTC (rev 39036)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp     
2010-10-20 22:01:24 UTC (rev 39037)
@@ -153,9 +153,10 @@
                // Use the last supported pixel format of the AVCodec, which we 
hope
                // is the one with the best quality (true for all currently 
supported
                // encoders).
-               AVCodec* codec = fStream->codec->codec;
-               for (int i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; i++)
-                       fStream->codec->pix_fmt = codec->pix_fmts[i];
+//             AVCodec* codec = fStream->codec->codec;
+//             for (int i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; i++)
+//                     fStream->codec->pix_fmt = codec->pix_fmts[i];
+               fStream->codec->pix_fmt = PIX_FMT_YUV420P;
 
        } else if (format->type == B_MEDIA_RAW_AUDIO) {
                fStream->codec->codec_type = AVMEDIA_TYPE_AUDIO;


Other related posts:

  • » [haiku-commits] r39037 - haiku/trunk/src/add-ons/media/plugins/ffmpeg - superstippi