Index: libavformat/rtpdec.c
===================================================================
--- libavformat/rtpdec.c	(revision 24513)
+++ libavformat/rtpdec.c	(working copy)
@@ -75,6 +75,7 @@
 
     ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfv_handler);
     ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);
+    ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_wmt_handler);
 }
 
 static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int len)
Index: libavformat/asfdec.c
===================================================================
--- libavformat/asfdec.c	(revision 24513)
+++ libavformat/asfdec.c	(working copy)
@@ -842,6 +842,7 @@
             assert(ret>=0);
             /* fail safe */
             url_fskip(pb, ret);
+asf->packet_size_left = asf->packet_padsize = 0;
 
             asf->packet_pos= url_ftell(pb);
             if (asf->data_object_size != (uint64_t)-1 &&
Index: libavformat/rtsp.c
===================================================================
--- libavformat/rtsp.c	(revision 24513)
+++ libavformat/rtsp.c	(working copy)
@@ -40,6 +40,7 @@
 #include "rdt.h"
 #include "rtpdec_asf.h"
 
+#undef printf
 //#define DEBUG
 //#define DEBUG_RTP_TCP
 
@@ -223,7 +224,7 @@
     struct in_addr sdp_ip;
     int ttl;
 
-    dprintf(s, "sdp: %c='%s'\n", letter, buf);
+    printf("sdp: %c='%s'\n", letter, buf);
 
     p = buf;
     if (s1->skip_media && letter != 'm')
@@ -812,7 +813,7 @@
         }
         *q = '\0';
 
-        dprintf(s, "line='%s'\n", buf);
+        printf("line='%s'\n", buf);
 
         /* test if last line */
         if (buf[0] == '\0')
@@ -903,7 +904,7 @@
         out_buf = base64buf;
     }
 
-    dprintf(s, "Sending:\n%s--\n", buf);
+    printf("Sending:\n%s--\n", buf);
 
     url_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
     if (send_content_length > 0 && send_content) {
@@ -982,6 +983,7 @@
     char cmd[2048];
     const char *trans_pref;
 
+//if (lower_transport != RTSP_LOWER_TRANSPORT_TCP) return 1;
     if (rt->transport == RTSP_TRANSPORT_RDT)
         trans_pref = "x-pn-tng";
     else
@@ -1863,7 +1865,9 @@
             for (i = 0; i < rt->nb_rtsp_streams; i++) {
                 rule_nr = 0;
                 for (r = 0; r < s->nb_streams; r++) {
-                    if (s->streams[r]->priv_data == rt->rtsp_streams[i]) {
+                    if (s->streams[r]->priv_data == rt->rtsp_streams[i] &&
+                        s->streams[r]->codec->codec_type != CODEC_TYPE_DATA
+/* hack */ && s->streams[r]->codec->channels > 0) {
                         if (s->streams[r]->discard != AVDISCARD_ALL) {
                             if (!first)
                                 av_strlcat(rt->last_subscription, ",",
Index: libavformat/rtpdec_asf.c
===================================================================
--- libavformat/rtpdec_asf.c	(revision 24513)
+++ libavformat/rtpdec_asf.c	(working copy)
@@ -122,9 +122,42 @@
 static int asfrtp_parse_sdp_line(AVFormatContext *s, int stream_index,
                                  PayloadContext *asf, const char *line)
 {
-    if (av_strstart(line, "stream:", &line)) {
         RTSPState *rt = s->priv_data;
 
+if (av_strstart(line, "RawHeader:buffer;\"", &line)){
+ByteIOContext pb;
+int ret, len = strlen(line) * 6 / 8;
+char *buf = av_mallocz(len);
+len = av_base64_decode(buf, line, len);
+
+        if (rtp_asf_fix_header(buf+8, len-8) < 0)
+            av_log(s, AV_LOG_ERROR,
+                   "Failed to fix invalid RTSP-MS/ASF min_pktsize\n");
+        init_packetizer(&pb, buf+8, len-8);
+        if (rt->asf_ctx) {
+            av_close_input_stream(rt->asf_ctx);
+            rt->asf_ctx = NULL;
+        }
+        ret = av_open_input_stream(&rt->asf_ctx, &pb, "", &asf_demuxer, NULL);
+        if (ret < 0)
+            return ret;
+        rt->asf_pb_pos = url_ftell(&pb);
+        av_free(buf);
+        rt->asf_ctx->pb = NULL;
+
+int i;
+for (i = 0; i < rt->asf_ctx->nb_streams; i++){
+AVStream *st = av_new_stream(s, 0);
+AVCodecContext *ctx = st->codec;
+*st = *rt->asf_ctx->streams[i];
+st->codec = ctx;
+*st->codec = *rt->asf_ctx->streams[i]->codec;
+rt->asf_ctx->streams[i]->codec->extradata_size = 0;
+rt->asf_ctx->streams[i]->codec->extradata = NULL;
+st->priv_data = s->streams[stream_index]->priv_data;
+}
+}
+    if (av_strstart(line, "stream:", &line)) {
         s->streams[stream_index]->id = strtol(line, NULL, 10);
 
         if (rt->asf_ctx) {
@@ -167,7 +200,18 @@
     if (!rt->asf_ctx)
         return -1;
 
-    if (len > 0) {
+#undef printf
+printf("Init, len=%d\n", len);
+if (len){
+av_free(asf->buf);
+asf->buf = av_malloc(len-8);
+memcpy(asf->buf, buf+8, len-8);
+        init_packetizer(pb, asf->buf, len-8);
+        pb->pos += rt->asf_pb_pos;
+        pb->eof_reached = 0;
+        rt->asf_ctx->pb = pb;
+}
+    if (len > 0 && 0) {
         int off, out_len = 0;
 
         if (len < 4)
@@ -230,7 +274,8 @@
                 int prev_len = out_len;
                 out_len += cur_len;
                 asf->buf = av_realloc(asf->buf, out_len);
-                memcpy(asf->buf + prev_len, buf + off, cur_len);
+                memcpy(asf->buf + prev_len, buf + off,
+                       FFMIN(cur_len, len - off));
                 url_fskip(pb, cur_len);
             }
         }
@@ -251,6 +296,8 @@
         for (i = 0; i < s->nb_streams; i++) {
             if (s->streams[i]->id == rt->asf_ctx->streams[pkt->stream_index]->id) {
                 pkt->stream_index = i;
+                pkt->dts = AV_NOPTS_VALUE;
+printf("Res\n");
                 return 1; // FIXME: return 0 if last packet
             }
         }
@@ -290,3 +337,4 @@
 
 RTP_ASF_HANDLER(asf_pfv, "x-asf-pf",  AVMEDIA_TYPE_VIDEO);
 RTP_ASF_HANDLER(asf_pfa, "x-asf-pf",  AVMEDIA_TYPE_AUDIO);
+RTP_ASF_HANDLER(asf_wmt, "x-pn-wmt",  AVMEDIA_TYPE_DATA);
Index: libavformat/rtpdec_asf.h
===================================================================
--- libavformat/rtpdec_asf.h	(revision 24513)
+++ libavformat/rtpdec_asf.h	(working copy)
@@ -37,6 +37,7 @@
  * Defined and implemented in rtp_asf.c, registered in rtpdec.c.
  */
 extern RTPDynamicProtocolHandler ff_ms_rtp_asf_pfv_handler,
-                                 ff_ms_rtp_asf_pfa_handler;
+                                 ff_ms_rtp_asf_pfa_handler,
+                                 ff_ms_rtp_asf_wmt_handler;
 
 #endif /* AVFORMAT_RTPDEC_ASF_H */
