diff options
author | Björn Axelsson <gecko@acc.umu.se> | 2007-11-06 16:19:09 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2007-11-06 16:19:09 +0000 |
commit | 49ce700a2782784af431e1b1734d53fb551fe5c9 (patch) | |
tree | 86040672004ea920ea86f3295a2f6d5195de08fc | |
parent | ff1463dc37b2cf3603eb0d61de022651560a63d6 (diff) | |
download | ffmpeg-49ce700a2782784af431e1b1734d53fb551fe5c9.tar.gz |
Allow propagation of stream selection through the ASF demuxer to the
MMSH protocol handler.
Patch by Björn Axelsson: bjorn ; axelsson § intinor : se
Original thread:
[FFmpeg-devel] [PATCH] MMSH stream selection support for asf demuxer
Date: 11/02/2007 11:51 AM
Originally committed as revision 10935 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/asf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 7b1ad67804..56272d9fa5 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -25,6 +25,8 @@ #include "common.h" #include "asfcrypt.h" +extern void ff_mms_set_stream_selection(URLContext *h, AVFormatContext *format); + #undef NDEBUG #include <assert.h> @@ -106,6 +108,12 @@ static void get_str16(ByteIOContext *pb, char *buf, int buf_size) } #endif +static int is_mms(ByteIOContext *pb) +{ + return url_fileno(pb) && url_fileno(pb)->prot && + !strcmp(url_fileno(pb)->prot->name, "mmsh"); +} + static void get_str16_nolen(ByteIOContext *pb, int len, char *buf, int buf_size) { char* q = buf; @@ -533,6 +541,12 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) } } +#ifdef CONFIG_MMSH_PROTOCOL + /* Give info about ourselves to the mms protocol */ + if(is_mms(pb)) + ff_mms_set_stream_selection(url_fileno(pb), s); +#endif + return 0; fail: |