From 5a97ae2715dcd22338355dd2f3b76e89f5c0cd04 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Jun 2015 21:25:51 +0200 Subject: 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). --- demux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux/demux_lavf.c') 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) -- cgit v1.2.3