summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-02 21:25:51 +0200
committerwm4 <wm4@nowhere>2015-06-02 22:25:34 +0200
commit5a97ae2715dcd22338355dd2f3b76e89f5c0cd04 (patch)
tree9004d1d33aabae0367ef253b69baff6f958fe057 /demux
parent7556f367d6bfde152570b84d48da7f3f8b066f53 (diff)
downloadmpv-5a97ae2715dcd22338355dd2f3b76e89f5c0cd04.tar.bz2
mpv-5a97ae2715dcd22338355dd2f3b76e89f5c0cd04.tar.xz
demux_lavf: fix wrong printf parameter type on 64 bit systems
"f.len - 4" is size_t, not int. Fix by using BSTR_P() (and a bstr function to adjust the length).
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 42355804c5..943fb1d8af 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -420,7 +420,7 @@ static char *replace_idx_ext(void *ta_ctx, bstr f)
if (f.len < 4 || f.start[f.len - 4] != '.')
return NULL;
char *ext = bstr_endswith0(f, "IDX") ? "SUB" : "sub"; // match case
- return talloc_asprintf(ta_ctx, "%.*s.%s", f.len - 4, f.start, ext);
+ return talloc_asprintf(ta_ctx, "%.*s.%s", BSTR_P(bstr_splice(f, 0, -4)), ext);
}
static void guess_and_set_vobsub_name(struct demuxer *demuxer, AVDictionary **d)