fixed #1615
authorAlexander Shishkov <no@email>
Wed, 22 Feb 2012 12:13:56 +0000 (12:13 +0000)
committerAlexander Shishkov <no@email>
Wed, 22 Feb 2012 12:13:56 +0000 (12:13 +0000)
modules/highgui/src/cap_ffmpeg_impl.hpp

index 8ef2880..d1e41f1 100644 (file)
@@ -1246,7 +1246,7 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int
 #else
                img_convert_ctx = sws_getContext(width,
                             height,
-                            PIX_FMT_BGR24,
+                     (PixelFormat)input_pix_fmt,
                             c->width,
                             c->height,
                             c->pix_fmt,