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).
This commit is contained in:
wm4 2015-06-02 21:25:51 +02:00
parent 7556f367d6
commit 5a97ae2715
1 changed files with 1 additions and 1 deletions

View File

@ -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)