filter_swscale.c: throw assert if creation of swscale context fails.
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 29 Jan 2009 05:01:28 +0000 (05:01 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Thu, 29 Jan 2009 05:01:28 +0000 (05:01 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1330 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/avformat/filter_swscale.c

index 1a31a87..bcb68dd 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <assert.h>
 
 static inline int is_big_endian( )
 {
@@ -125,6 +126,7 @@ static int filter_scale( mlt_frame this, uint8_t **image, mlt_image_format iform
 
        // Create the context and output image
        struct SwsContext *context = sws_getContext( iwidth, iheight, iformat, owidth, oheight, oformat, interp, NULL, NULL, NULL);
+       assert(swscale);
 
        // Perform the scaling
        sws_scale( context, input.data, input.linesize, 0, iheight, output.data, output.linesize);