try to load pictures first (faster startup when loading images)

This commit is contained in:
niels
2015-11-14 23:08:36 +01:00
parent dabdc50f9f
commit 797a0ccdfc
3 changed files with 40 additions and 43 deletions

View File

@@ -76,14 +76,13 @@ static VJFrame *open_pixbuf( vj_pixbuf_t *pic, const char *filename, int dst_w,
GdkPixbuf *image =
gdk_pixbuf_new_from_file( filename, NULL );
size_t pixbuf_size = gdk_pixbuf_get_byte_length( image );
if(!image)
{
veejay_msg(VEEJAY_MSG_ERROR, "Unable to load image '%s'", filename);
return NULL;
}
size_t pixbuf_size = gdk_pixbuf_get_byte_length( image );
/* convert image to veejay frame in proper dimensions, free image */
int img_fmt = PIX_FMT_RGB24;