Mercurial > mplayer.hg
changeset 36736:cb25e73ac822
Make sdp:// URLs also work via FFmpeg.
author | reimar |
---|---|
date | Fri, 14 Feb 2014 19:01:19 +0000 |
parents | abfc4f859671 |
children | 456840015a07 |
files | stream/stream_file.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_file.c Fri Feb 14 12:44:40 2014 +0000 +++ b/stream/stream_file.c Fri Feb 14 19:01:19 2014 +0000 @@ -37,6 +37,7 @@ #include "m_option.h" #include "m_struct.h" #include "osdep/osdep.h" +#include "libmpdemux/demuxer.h" static struct stream_priv_s { char* filename; @@ -224,6 +225,13 @@ stream->type = STREAMTYPE_FILE; } + // support sdp:// also via FFmpeg if live555 was not compiled in + if (stream->url && !strncmp(stream->url, "sdp://", 6)) { + *file_format = DEMUXER_TYPE_LAVF; + stream->type = STREAMTYPE_SDP; + stream->flags = STREAM_NON_CACHEABLE; + } + mp_msg(MSGT_OPEN,MSGL_V,"[file] File size is %"PRId64" bytes\n", (int64_t)len); stream->fd = f; @@ -242,7 +250,7 @@ "Albeu", "based on the code from ??? (probably Arpi)", open_f, - { "file", "", NULL }, + { "file", "", "sdp", NULL }, &stream_opts, 1 // Urls are an option string };