[MPlayer-cvslog] r26728 - trunk/libmpdemux/demux_lavf.c
michael
subversion at mplayerhq.hu
Sat May 10 21:29:38 CEST 2008
Author: michael
Date: Sat May 10 21:29:38 2008
New Revision: 26728
Log:
AVOption support for lavf demuxing
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Sat May 10 21:29:38 2008
@@ -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
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(demuxe
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
More information about the MPlayer-cvslog
mailing list