# HG changeset patch # User benoit # Date 1194365949 0 # Node ID 046577e618bdb4f975cbf0d83077011229f19020 # Parent 0199fcbb9d2349fadc51aa065f2fe30efa7b259e 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 diff -r 0199fcbb9d23 -r 046577e618bd asf.c --- a/asf.c Tue Nov 06 16:02:33 2007 +0000 +++ b/asf.c Tue Nov 06 16:19:09 2007 +0000 @@ -25,6 +25,8 @@ #include "common.h" #include "asfcrypt.h" +extern void ff_mms_set_stream_selection(URLContext *h, AVFormatContext *format); + #undef NDEBUG #include @@ -106,6 +108,12 @@ } #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 @@ } } +#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: