[FFmpeg-cvslog] r10935 - trunk/libavformat/asf.c
benoit
subversion
Tue Nov 6 17:19:09 CET 2007
Author: benoit
Date: Tue Nov 6 17:19:09 2007
New Revision: 10935
Log:
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
Modified:
trunk/libavformat/asf.c
Modified: trunk/libavformat/asf.c
==============================================================================
--- trunk/libavformat/asf.c (original)
+++ trunk/libavformat/asf.c Tue Nov 6 17:19:09 2007
@@ -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,
}
#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(AVFormatConte
}
}
+#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:
More information about the ffmpeg-cvslog
mailing list