From 82a15be00ea1027b4f62bed463afab844d47c2b9 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Tue, 14 Jan 2020 19:40:33 +0100 Subject: [PATCH] Explicitly set stdout to binary --- thumbnailer/shotwell-video-thumbnailer.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/thumbnailer/shotwell-video-thumbnailer.vala b/thumbnailer/shotwell-video-thumbnailer.vala index 5da4deaf..e31e00ee 100644 --- a/thumbnailer/shotwell-video-thumbnailer.vala +++ b/thumbnailer/shotwell-video-thumbnailer.vala @@ -19,6 +19,7 @@ class ShotwellThumbnailer { uint8[]? pngdata; int64 duration, position; Gst.StateChangeReturn ret; + var out = FileStream.fdopen(Posix.dup(stdout.fileno()), "wb"); if (Posix.nice (19) < 0) { debug ("Failed to reduce thumbnailer nice level. Continuing anyway"); @@ -115,14 +116,12 @@ class ShotwellThumbnailer { } } - stderr.printf("Oritentation: %s\n", direction.to_string()); - // Save the pixbuf. if (direction != Gdk.PixbufRotation.NONE) { pixbuf = pixbuf.rotate_simple(direction); } pixbuf.save_to_buffer(out pngdata, "png"); - stdout.write(pngdata); + out.write(pngdata); // cleanup and exit. pipeline.set_state(Gst.State.NULL); -- 2.20.1