Author: fejj
Date: 2007-06-06 09:42:57 -0400 (Wed, 06 Jun 2007)
New Revision: 78736
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/ffvideo.cpp
Log:
2007-06-06 Jeffrey Stedfast <[EMAIL PROTECTED]>
* ffvideo.cpp (convert_to_rgb): Make sure the frame->data is
non-NULL before trying to scale.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-06 13:42:37 UTC (rev 78735)
+++ trunk/moon/src/ChangeLog 2007-06-06 13:42:57 UTC (rev 78736)
@@ -1,3 +1,8 @@
+2007-06-06 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * ffvideo.cpp (convert_to_rgb): Make sure the frame->data is
+ non-NULL before trying to scale.
+
2007-06-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* brush.cpp: Fix compiler warning.
Modified: trunk/moon/src/ffvideo.cpp
===================================================================
--- trunk/moon/src/ffvideo.cpp 2007-06-06 13:42:37 UTC (rev 78735)
+++ trunk/moon/src/ffvideo.cpp 2007-06-06 13:42:57 UTC (rev 78736)
@@ -383,7 +383,10 @@
AVCodecContext *cc = video->video_stream->codec;
uint8_t *rgb_dest[3] = { video->video_rgb_buffer, NULL, NULL};
int rgb_stride [3] = { cc->width * 4, 0, 0 };
-
+
+ if (frame->data == NULL)
+ return;
+
sws_scale (video->video_scale_context, frame->data, frame->linesize, 0,
video->video_stream->codec->height, rgb_dest, rgb_stride);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches