From 099cdbf019424b6096aebd45b8ca68bc29068e70 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Jun 2014 22:48:11 +0200 Subject: demux_mf: remove global option variables --- demux/demux_mf.c | 12 ++++++------ demux/mf.c | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'demux') diff --git a/demux/demux_mf.c b/demux/demux_mf.c index 1284c7fd7f..fa5908c493 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -26,8 +26,8 @@ #include "osdep/io.h" #include "talloc.h" -#include "config.h" #include "common/msg.h" +#include "options/options.h" #include "stream/stream.h" #include "demux.h" @@ -142,11 +142,11 @@ static const struct { {0} }; -static const char *probe_format(mf_t *mf, enum demux_check check) +static const char *probe_format(mf_t *mf, char *type, enum demux_check check) { if (check > DEMUX_CHECK_REQUEST) return NULL; - char *type = mf_type; + char *org_type = type; if (!type || !type[0]) { char *p = strrchr(mf->names[0], '.'); if (p) @@ -157,7 +157,7 @@ static const char *probe_format(mf_t *mf, enum demux_check check) return type2format[i].codec; } if (check == DEMUX_CHECK_REQUEST) { - if (!mf_type) { + if (!org_type) { MP_ERR(mf, "file type was not set! (try --mf-type=ext)\n"); } else { MP_ERR(mf, "--mf-type set to an unknown codec!\n"); @@ -183,7 +183,7 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check) if (!mf || mf->nr_of_files < 1) goto error; - const char *codec = probe_format(mf, check); + const char *codec = probe_format(mf, demuxer->opts->mf_type, check); if (!codec) goto error; @@ -196,7 +196,7 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check) sh->codec = codec; sh_video->disp_w = 0; sh_video->disp_h = 0; - sh_video->fps = mf_fps; + sh_video->fps = demuxer->opts->mf_fps; mf->sh = sh_video; demuxer->priv = (void *)mf; diff --git a/demux/mf.c b/demux/mf.c index 173593f167..5edc98043a 100644 --- a/demux/mf.c +++ b/demux/mf.c @@ -34,9 +34,6 @@ #include "mf.h" -double mf_fps = 1.0; -char *mf_type = NULL; //"jpg"; - static void mf_add(mf_t *mf, const char *fname) { char *entry = talloc_strdup(mf, fname); -- cgit v1.2.3