diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-09-29 07:55:43 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-09-29 07:55:43 +0000 |
commit | fffb09b9b3b5718963e7529120d44ef9a6ad8a28 (patch) | |
tree | 972c3b32d5b70b54f5c9988b48cc552daec823d5 | |
parent | b267bd3921b03b042b92a9e5fe248f9f4026c34c (diff) | |
download | mpv-fffb09b9b3b5718963e7529120d44ef9a6ad8a28.tar.bz2 mpv-fffb09b9b3b5718963e7529120d44ef9a6ad8a28.tar.xz |
analyzeduration option for lavf demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24655 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 4 | ||||
-rw-r--r-- | libmpdemux/demux_lavf.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 5f419e5d18..2d5f4aadf2 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -10100,6 +10100,10 @@ The same principle as for vbuf_size applies. .SS FFmpeg libavformat demuxers (\-lavfdopts) . .TP +.B analyzeduration=<value> +Maximum length in seconds to analyze the stream properties. +. +.TP .B format=<value> Force a specific libavformat demuxer. . diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index b232c2e2cc..eff31274ff 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -47,11 +47,13 @@ extern char *audio_lang; static unsigned int opt_probesize = 0; +static unsigned int opt_analyzeduration = 0; static char *opt_format; 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}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -273,6 +275,10 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ opt = av_set_int(avfc, "probesize", opt_probesize); if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option probesize to %u\n", opt_probesize); } + if(opt_analyzeduration) { + opt = av_set_int(avfc, "analyzeduration", opt_analyzeduration * AV_TIME_BASE); + if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option analyzeduration to %u\n", opt_analyzeduration); + } if(demuxer->stream->url) strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3); |