diff --git a/plugins/notify/notify.c b/plugins/notify/notify.c index 64efd30e21..82d8aa2042 100644 --- a/plugins/notify/notify.c +++ b/plugins/notify/notify.c @@ -23,9 +23,11 @@ #include #include #include +#include #include "../../gettext.h" #include "../artwork/artwork.h" +#define MAX_ALBUM_ART_FILE_SIZE (40 * 1024 * 1024) #define E_NOTIFICATION_BUS_NAME "org.freedesktop.Notifications" #define E_NOTIFICATION_INTERFACE "org.freedesktop.Notifications" #define E_NOTIFICATION_PATH "/org/freedesktop/Notifications" @@ -206,7 +208,7 @@ _load_image_from_cover (const char *image_filename) { GdkPixbuf *img = NULL; long size = 0; - char *buf = _buffer_from_file (cover->image_filename, &size); + char *buf = _buffer_from_file (image_filename, &size); if (buf != NULL) { GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); gdk_pixbuf_loader_write (loader, (const guchar *)buf, size, NULL); @@ -300,12 +302,12 @@ show_notification (DB_playItem_t *track, char *image_filename, dbus_uint32_t rep // GdkPixbuf *img = _load_image_from_cover(image_filename); struct { - dbus_int32_t width = 2; - dbus_int32_t height = 2; - dbus_int32_t stride = 8; - dbus_bool_t has_alpha = 0; - dbus_int32_t bits_per_sample = 32; - dbus_int32_t channels = 4; + dbus_int32_t width; + dbus_int32_t height; + dbus_int32_t stride; + dbus_bool_t has_alpha; + dbus_int32_t bits_per_sample; + dbus_int32_t channels; uint32_t bytes[4]; } image_data;