diff options
author | Gaël Bonithon <gael@xfce.org> | 2021-12-13 17:39:44 +0100 |
---|---|---|
committer | Gaël Bonithon <gael@xfce.org> | 2021-12-13 18:06:27 +0100 |
commit | d82e509551db98ff70e47d1990f759948ee7fecd (patch) | |
tree | 3b97d5ef364aa36c5e5fe7e0931c427f50cabc10 /plugins | |
parent | 1de05df20d52fb45e3c06e1d5ff36984341cb55d (diff) | |
download | tumbler-d82e509551db98ff70e47d1990f759948ee7fecd.tar.gz |
ffmpeg-thumbnailer: Fix deprecation warning
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c index 8ada5ef..a361d1f 100644 --- a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c +++ b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c @@ -38,6 +38,12 @@ #include <ffmpeg-thumbnailer/ffmpeg-thumbnailer.h> +#define TUMBLER_FFMPEG_CHECK_VERSION(major, minor, micro) \ + (TUMBLER_FFMPEG_MAJOR_VERSION > (major) || \ + (TUMBLER_FFMPEG_MAJOR_VERSION == (major) && TUMBLER_FFMPEG_MINOR_VERSION > (minor)) || \ + (TUMBLER_FFMPEG_MAJOR_VERSION == (major) && TUMBLER_FFMPEG_MINOR_VERSION == (minor) && \ + TUMBLER_FFMPEG_MICRO_VERSION >= (micro))) + static void ffmpeg_thumbnailer_finalize (GObject *object); static void ffmpeg_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, GCancellable *cancellable, @@ -199,7 +205,11 @@ ffmpeg_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, g_object_unref (flavor); /* prepare the video thumbnailer */ +#if TUMBLER_FFMPEG_CHECK_VERSION (2, 2, 1) + video_thumbnailer_set_size (ffmpeg_thumbnailer->video, dest_width, dest_height); +#else ffmpeg_thumbnailer->video->thumbnail_size = MAX (dest_width, dest_height); +#endif v_data = video_thumbnailer_create_image_data (); uri = tumbler_file_info_get_uri (info); |