[MPlayer-cvslog] r24655 - in trunk: DOCS/man/en/mplayer.1 libmpdemux/demux_lavf.c

henry subversion at mplayerhq.hu
Sat Sep 29 09:55:43 CEST 2007


Author: henry
Date: Sat Sep 29 09:55:43 2007
New Revision: 24655

Log:
analyzeduration option for lavf demuxer

Modified:
   trunk/libmpdemux/demux_lavf.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	(original)
+++ trunk/libmpdemux/demux_lavf.c	Sat Sep 29 09:55:43 2007
@@ -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(demuxe
         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);



More information about the MPlayer-cvslog mailing list