diff options
Diffstat (limited to 'demux/demux_mf.c')
-rw-r--r-- | demux/demux_mf.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/demux/demux_mf.c b/demux/demux_mf.c index 20b948630c..4abd394317 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -27,6 +27,7 @@ #include "mpv_talloc.h" #include "common/msg.h" #include "options/options.h" +#include "options/m_config.h" #include "options/path.h" #include "misc/ctype.h" @@ -304,10 +305,15 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check) if (!mf || mf->nr_of_files < 1) goto error; - char *force_type = demuxer->opts->mf_type; + double mf_fps; + char *mf_type; + mp_read_option_raw(demuxer->global, "mf-fps", &m_option_type_double, &mf_fps); + mp_read_option_raw(demuxer->global, "mf-type", &m_option_type_string, &mf_type); + const char *codec = mp_map_mimetype_to_video_codec(demuxer->stream->mime_type); - if (!codec || (force_type && force_type[0])) - codec = probe_format(mf, force_type, check); + if (!codec || (mf_type && mf_type[0])) + codec = probe_format(mf, mf_type, check); + talloc_free(mf_type); if (!codec) goto error; @@ -320,7 +326,7 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check) c->codec = codec; c->disp_w = 0; c->disp_h = 0; - c->fps = demuxer->opts->mf_fps; + c->fps = mf_fps; c->reliable_fps = true; demux_add_sh_stream(demuxer, sh); |