summaryrefslogtreecommitdiffstats
path: root/screenshot.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-03-16 18:57:23 +0100
committerwm4 <wm4@mplayer2.org>2012-03-16 19:14:44 +0100
commit6de8120822c2dd9c50ef23b4977421651396f1ae (patch)
tree11a977608cfc9f50cffbce4a879dd8e9b33b029c /screenshot.c
parent0eb21226cbfdd200f2aea5d3a9db2cdbff4773a5 (diff)
parenta8168102668337f3c11619bea7e744fc245adff1 (diff)
downloadmpv-6de8120822c2dd9c50ef23b4977421651396f1ae.tar.bz2
mpv-6de8120822c2dd9c50ef23b4977421651396f1ae.tar.xz
Merge remote-tracking branch 'origin/master' into my_master
Conflicts: command.c mp_core.h mplayer.c screenshot.c
Diffstat (limited to 'screenshot.c')
-rw-r--r--screenshot.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/screenshot.c b/screenshot.c
index 64eda204a1..c570701de1 100644
--- a/screenshot.c
+++ b/screenshot.c
@@ -23,10 +23,6 @@
#include <setjmp.h>
#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
#include <libswscale/swscale.h>
#include <libavcodec/avcodec.h>
@@ -43,6 +39,7 @@
#include "bstr.h"
#include "mp_msg.h"
#include "metadata.h"
+#include "path.h"
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/mp_image.h"
#include "libmpcodecs/dec_video.h"
@@ -209,11 +206,7 @@ static const struct img_writer *get_writer(screenshot_ctx *ctx)
static int fexists(char *fname)
{
- struct stat dummy;
- if (stat(fname, &dummy) == 0)
- return 1;
- else
- return 0;
+ return mp_path_exists(fname);
}
static char *stripext(void *talloc_ctx, const char *s)