diff options
author | cboesch <cboesch@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-12-04 10:24:42 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-12-16 05:27:13 +0200 |
commit | 920d0976e7f657b34804b39bfbb4785fd24a76f0 (patch) | |
tree | ddcb7bf19966dc8d22bd3c0812f04b98cfd19085 /vobsub.c | |
parent | 9e35edf08bcb1b5b5d50a6860d133669fa184673 (diff) | |
download | mpv-920d0976e7f657b34804b39bfbb4785fd24a76f0.tar.bz2 mpv-920d0976e7f657b34804b39bfbb4785fd24a76f0.tar.xz |
Change some filename-handling code to use mp_basename()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32675 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vobsub.c')
-rw-r--r-- | vobsub.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -36,6 +36,7 @@ #include "vobsub.h" #include "spudec.h" #include "mp_msg.h" +#include "path.h" #include "unrar_exec.h" #include "libavutil/common.h" @@ -96,11 +97,7 @@ static rar_stream_t *rar_open(const char *const filename, strcat(rar_filename, ".rar"); } /* get rid of the path if there is any */ - if ((p = strrchr(filename, '/')) == NULL) { - p = filename; - } else { - p++; - } + p = mp_basename(filename); rc = unrar_exec_get(&stream->data, &stream->size, p, rar_filename); if (!rc) { /* There is no matching filename in the archive. However, sometimes |