[totem/gnome-3-0] thumbnailer: Fix gallery mode's last picture
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-0] thumbnailer: Fix gallery mode's last picture
- Date: Tue, 5 Apr 2011 18:30:46 +0000 (UTC)
commit 9e8ca5f9175739a723401a45418bfa762571bbdd
Author: Bastien Nocera <hadess hadess net>
Date: Tue Apr 5 19:12:51 2011 +0100
thumbnailer: Fix gallery mode's last picture
We were trying to get the last picture at the same offset
as the file duration. Seek would have failed there, and
we wouldn't be able to get a frame.
src/totem-video-thumbnailer.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-video-thumbnailer.c b/src/totem-video-thumbnailer.c
index cb235dd..09a1217 100644
--- a/src/totem-video-thumbnailer.c
+++ b/src/totem-video-thumbnailer.c
@@ -607,7 +607,10 @@ create_gallery (BaconVideoWidget *bvw, const char *input, const char *output)
/* Take the screenshots and composite them into a pixbuf */
current_column = current_row = x = y = 0;
for (pos = screenshot_interval; pos <= stream_length; pos += screenshot_interval) {
- screenshot = capture_frame_at_time (bvw, input, output, pos);
+ if (pos == stream_length)
+ screenshot = capture_frame_at_time (app, input, output, pos - 1);
+ else
+ screenshot = capture_frame_at_time (app, input, output, pos);
if (pixbuf == NULL) {
screenshot_width = gdk_pixbuf_get_width (screenshot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]