diff options
author | wm4 <wm4@nowhere> | 2013-12-22 23:04:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-22 23:25:08 +0100 |
commit | 3782fa20edcd3e4bdbbfa5ffbd430449b97c009a (patch) | |
tree | f9021405d4f140a5405041027d04a06746339d32 /player | |
parent | c31ce789c5058e076b3219d19a0441171add9c08 (diff) | |
download | mpv-3782fa20edcd3e4bdbbfa5ffbd430449b97c009a.tar.bz2 mpv-3782fa20edcd3e4bdbbfa5ffbd430449b97c009a.tar.xz |
path: change mp_splitext() semantics
Including the "." in the returned extension was too inconvenient. I
think originally, the semantics were supposed to work like in Python,
but screw this.
Also, return NULL instead of "" on failure (which is what its only user
actually seems to expect).
Diffstat (limited to 'player')
-rw-r--r-- | player/screenshot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index 7336c64e97..500960aee4 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -347,7 +347,7 @@ void screenshot_to_file(struct MPContext *mpctx, const char *filename, int mode, } char *ext = mp_splitext(filename, NULL); if (ext) - opts.format = ext + 1; // omit '.' + opts.format = ext; struct mp_image *image = screenshot_get(mpctx, mode); if (!image) { screenshot_msg(ctx, SMSG_ERR, "Taking screenshot failed."); |