diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-10 19:29:38 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-05-10 19:29:38 +0000 |
commit | 5f4cface7b57633ed77461ef8feb1cbc689018ad (patch) | |
tree | 96a390c09e859ffe680f563b5f01ea18eec5e107 /libmpdemux | |
parent | 2ce3df53b1936fd52e6bb58868c34ae2fef989fa (diff) |
AVOption support for lavf demuxing
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26728 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_lavf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 942a80fc56..48f65be76e 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -24,6 +24,7 @@ #include "config.h" #include "mp_msg.h" #include "help_mp.h" +#include "av_opts.h" #include "stream/stream.h" #include "demuxer.h" @@ -49,12 +50,14 @@ static unsigned int opt_analyzeduration = 0; static char *opt_format; static char *opt_cryptokey; extern int ts_prog; +static char *opt_avopt = NULL; const m_option_t lavfdopts_conf[] = { {"probesize", &(opt_probesize), CONF_TYPE_INT, CONF_RANGE, 32, INT_MAX, NULL}, {"format", &(opt_format), CONF_TYPE_STRING, 0, 0, 0, NULL}, {"analyzeduration", &(opt_analyzeduration), CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL}, {"cryptokey", &(opt_cryptokey), CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"o", &opt_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -435,6 +438,13 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option analyzeduration to %u\n", opt_analyzeduration); } + if(opt_avopt){ + if(parse_avopts(avfc, opt_avopt) < 0){ + mp_msg(MSGT_HEADER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", opt_avopt); + return NULL; + } + } + if(demuxer->stream->url) strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3); else |