From 18e79995af5c66c3f0f6ef26c8ed01bc54c171f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 9 Apr 2009 20:21:46 +0100 Subject: [PATCH] realmedia: add special Real header to SETUP message only for Real servers Fixes playback of Windows Media RTSP streams and other non-Real RTSP streams where the server errors out because it can't handle the Real-specific 'Required: com.real.retain-entity-for-setup' header we've been adding unconditionally in the recent past. For reference: rtsp://66.111.34.191:601/broadcast/alnour.rm rtsp://195.134.224.231/snowboard_100.wmv --- gst/realmedia/rtspreal.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/realmedia/rtspreal.c b/gst/realmedia/rtspreal.c index 9b5228fe1e..94d095410b 100644 --- a/gst/realmedia/rtspreal.c +++ b/gst/realmedia/rtspreal.c @@ -127,8 +127,10 @@ rtsp_ext_real_before_send (GstRTSPExtension * ext, GstRTSPMessage * request) "Linux_2.4_6.0.9.1235_play32_RN01_EN_586"); gst_rtsp_message_add_header (request, GST_RTSP_HDR_MAX_ASM_WIDTH, "1"); gst_rtsp_message_add_header (request, GST_RTSP_HDR_LANGUAGE, "en-US"); - gst_rtsp_message_add_header (request, GST_RTSP_HDR_REQUIRE, - "com.real.retain-entity-for-setup"); + if (ctx->isreal) { + gst_rtsp_message_add_header (request, GST_RTSP_HDR_REQUIRE, + "com.real.retain-entity-for-setup"); + } break; } case GST_RTSP_SETUP: @@ -170,6 +172,9 @@ rtsp_ext_real_after_send (GstRTSPExtension * ext, GstRTSPMessage * req, gst_rtsp_ext_real_calc_response_and_checksum (ctx->challenge2, ctx->checksum, challenge1); + + GST_DEBUG_OBJECT (ctx, "Found Real challenge tag"); + ctx->isreal = TRUE; break; } case GST_RTSP_DESCRIBE: