diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 02:44:37 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 02:44:37 +0200 |
commit | 819b8f08a2d2223a9a4e9a3c65b05b3a3bfaf781 (patch) | |
tree | f6d6d1e944e5b44ac1d26adcecc4379cd9dc4806 /stream | |
parent | 3488fcafe6709337b25a742999a03d04d561f419 (diff) | |
parent | 3f1a03feb15344188a8213854246d42db38314ac (diff) | |
download | mpv-819b8f08a2d2223a9a4e9a3c65b05b3a3bfaf781.tar.bz2 mpv-819b8f08a2d2223a9a4e9a3c65b05b3a3bfaf781.tar.xz |
Merge svn changes up to r30236
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_ffmpeg.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/stream/stream_ffmpeg.c b/stream/stream_ffmpeg.c index 6743720ffe..1f10793511 100644 --- a/stream/stream_ffmpeg.c +++ b/stream/stream_ffmpeg.c @@ -7,28 +7,6 @@ #include "m_option.h" #include "m_struct.h" -static struct stream_priv_s { - char *filename; - char *filename2; -} stream_priv_dflts = { - NULL, NULL -}; - -#define ST_OFF(f) M_ST_OFF(struct stream_priv_s,f) -/// URL definition -static const m_option_t stream_opts_fields[] = { - {"string", ST_OFF(filename), CONF_TYPE_STRING, 0, 0 ,0, NULL}, - {"filename", ST_OFF(filename2), CONF_TYPE_STRING, 0, 0 ,0, NULL}, - {NULL} -}; - -static const struct m_struct_st stream_opts = { - "ffmpeg", - sizeof(struct stream_priv_s), - &stream_priv_dflts, - stream_opts_fields -}; - static int fill_buffer(stream_t *s, char *buffer, int max_len) { int r = url_read(s->priv, buffer, max_len); @@ -76,7 +54,6 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) { int flags = 0; const char *filename; - struct stream_priv_s *p = opts; URLContext *ctx = NULL; int res = STREAM_ERROR; int64_t size; @@ -92,10 +69,8 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) goto out; } - if (p->filename) - filename = p->filename; - else if (p->filename2) - filename = p->filename2; + if (stream->url) + filename = stream->url; else { mp_msg(MSGT_OPEN, MSGL_ERR, "[ffmpeg] No URL\n"); goto out; @@ -124,7 +99,6 @@ static int open_f(stream_t *stream, int mode, void *opts, int *file_format) res = STREAM_OK; out: - m_struct_free(&stream_opts,opts); return res; } @@ -134,7 +108,7 @@ const stream_info_t stream_info_ffmpeg = { "", "", open_f, - { "ffmpeg", NULL }, - &stream_opts, + { "ffmpeg", "rtmp", NULL }, + NULL, 1 // Urls are an option string }; |