# HG changeset patch # User reimar # Date 1392404479 0 # Node ID cb25e73ac822c9008463413bc5e3702d16598e22 # Parent abfc4f85967119f26c069ebff66bcd09f3c219bd Make sdp:// URLs also work via FFmpeg. diff -r abfc4f859671 -r cb25e73ac822 stream/stream_file.c --- 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 };