summaryrefslogtreecommitdiffstats
path: root/vobsub.c
diff options
context:
space:
mode:
authorcboesch <cboesch@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-12-04 10:24:42 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-12-16 05:27:13 +0200
commit920d0976e7f657b34804b39bfbb4785fd24a76f0 (patch)
treeddcb7bf19966dc8d22bd3c0812f04b98cfd19085 /vobsub.c
parent9e35edf08bcb1b5b5d50a6860d133669fa184673 (diff)
downloadmpv-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.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vobsub.c b/vobsub.c
index e9868b3f2c..08efa3acec 100644
--- a/vobsub.c
+++ b/vobsub.c
@@ -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