summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-12-15 15:55:31 +0100
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-12-15 15:55:31 +0100
commit42bf9d208e50eb73490a5f001f497f7e8ea2e45e (patch)
tree1bc8edc0e0d0edb027c8774be90c7ab6db949653 /src/media-thumb-internal.c
parent37205426f1d5468d4240af9e64b8d308ca13dfe1 (diff)
downloadlibmedia-thumbnail-sandbox/jmartin/video.tar.gz
libmedia-thumbnail-sandbox/jmartin/video.tar.bz2
libmedia-thumbnail-sandbox/jmartin/video.zip
thumbnail-videosandbox/jmartin/video
Change-Id: I8204d0aed2763150ed4ea6bb136745c093b1af7a Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index 9fc6086..89a4a77 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -1100,8 +1100,14 @@ _media_thumb_video(const char *origin_path,
thumb_info->size = size;
thumb_info->width = width;
thumb_info->height = height;
- thumb_info->data = malloc(size);
- memcpy(thumb_info->data, frame, size);
+// thumb_info->data = malloc(size);
+// memcpy(thumb_info->data, frame, size);
+
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_data (frame, GDK_COLORSPACE_RGB, FALSE, 8, width, height, 3*width, NULL, NULL);
+
+ thumb_info->data = gdk_pixbuf_copy(pixbuf);
}
mm_file_destroy_content_attrs(content);
@@ -1186,12 +1192,12 @@ _media_thumb_video(const char *origin_path,
thumb_info->height = r_h;
}
- err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
- if (err < 0) {
- thumb_err("_media_thumb_convert_format falied: %d", err);
- SAFE_FREE(thumb_info->data);
- return err;
- }
+// err = _media_thumb_convert_format(thumb_info, MEDIA_THUMB_RGB888, format);
+// if (err < 0) {
+// thumb_err("_media_thumb_convert_format falied: %d", err);
+// SAFE_FREE(thumb_info->data);
+// return err;
+// }
} else {
thumb_dbg("no contents information\n");
frame = NULL;