diff options
author | Dudemanguy <random342@airmail.cc> | 2023-09-19 15:58:34 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-09-22 14:20:38 +0000 |
commit | b2edd4312d06de7ced543e2e389c1e3866c27755 (patch) | |
tree | 04ed2f17c38d3dd879fc2344fd6a1c68a1ae5e4a /demux/demux_mf.c | |
parent | a343666ab5121e7a3388be9aa2d8731d6d1f2f64 (diff) | |
download | mpv-b2edd4312d06de7ced543e2e389c1e3866c27755.tar.bz2 mpv-b2edd4312d06de7ced543e2e389c1e3866c27755.tar.xz |
demuxer: remove several mp_read_option_raw calls
With the previous commit, we can just access option values directly now
and avoid a lot of complication. Note that the mp_read_option_raw call
for edition requires calling mp_get_config_group since that option needs
to live in MPOpts.
Diffstat (limited to 'demux/demux_mf.c')
-rw-r--r-- | demux/demux_mf.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/demux/demux_mf.c b/demux/demux_mf.c index 2e5cfbaacb..b24dd3be01 100644 --- a/demux/demux_mf.c +++ b/demux/demux_mf.c @@ -382,15 +382,9 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check) if (!mf || mf->nr_of_files < 1) goto error; - 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 || (mf_type && mf_type[0])) - codec = probe_format(mf, mf_type, check); - talloc_free(mf_type); + if (!codec || (demuxer->opts->mf_type && demuxer->opts->mf_type[0])) + codec = probe_format(mf, demuxer->opts->mf_type, check); if (!codec) goto error; @@ -407,7 +401,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 = mf_fps; + c->fps = demuxer->opts->mf_fps; c->reliable_fps = true; demux_add_sh_stream(demuxer, sh); |