Mercurial > mplayer.hg
changeset 24635:0ad5adc5f363
analyzeduration option for lavf demuxer
author | henry |
---|---|
date | Sat, 29 Sep 2007 07:55:43 +0000 |
parents | 221ad386f6e4 |
children | 389960ca6c3b |
files | DOCS/man/en/mplayer.1 libmpdemux/demux_lavf.c |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Sat Sep 29 07:49:02 2007 +0000 +++ b/DOCS/man/en/mplayer.1 Sat Sep 29 07:55:43 2007 +0000 @@ -10100,6 +10100,10 @@ .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. .
--- a/libmpdemux/demux_lavf.c Sat Sep 29 07:49:02 2007 +0000 +++ b/libmpdemux/demux_lavf.c Sat Sep 29 07:55:43 2007 +0000 @@ -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 @@ 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);