[gegl] ff-load: follow symlinks



commit 4549f1982dfbc1155d7115edd30abec94c330cee
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Jan 28 14:49:37 2016 +0100

    ff-load: follow symlinks

 operations/external/ff-load.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 36ece02..f34e46d 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -53,6 +53,8 @@ property_audio_fragment (audio, _("audio"), 0)
 
 #include "gegl-op.h"
 #include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
 
 #include <libavformat/avformat.h>
 #include <libswscale/swscale.h>
@@ -411,10 +413,13 @@ prepare (GeglOperation *operation)
       )
     {
       gint i;
+      gchar dereferenced_path[PATH_MAX];
       gint err;
 
       ff_cleanup (o);
-      err = avformat_open_input(&p->video_fcontext, o->path, NULL, 0);
+      realpath (o->path, dereferenced_path);
+      fprintf (stderr, "%s %s\n", o->path, dereferenced_path);
+      err = avformat_open_input(&p->video_fcontext, dereferenced_path, NULL, 0);
       if (err < 0)
         {
           print_error (o->path, err);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]