user-agent duplicated in rtspsrc header
Submitted by Stuart
Link to original bug (#774806)
Description
Created attachment 340464
Quick work around fix
The commit from:
https://bugzilla.gnome.org/show_bug.cgi?id=750101
causes rtspsrc to add two 'user-agents' to the rtsp header.
This causes problems with some rtsp servers (tested with Panasonic cameras) as they reply back 400 (Bad Request) and hence the stream does not connect (viewable in logs as well as wireshark).
I've tested with v1.6, however, believe the issue to remain in master (I'll try and get round to testing with master when I can!).
It appears that gst_rtsp_ext_list_before_send() does not check whether any initialisation has been done already and hence just adds what it gets from the iface.
So far I've just added some code to check if there's multiple GST_RTSP_HDR_USER_AGENT's in the message header in gst_rtspsrc_try_send() and remove the header value if needed. A better solution would be to add functionality to either have gst_rtsp_ext_list_before_send() check whether something has been already initialised, or check against rtsp_headers[] to see if there are multiples of headers when there shouldn't be and remove the latest.
Any pointers would be helpful on where best to implement this!
Cheers,
Stu
Patch 340464, "Quick work around fix":
GstRTSPSrc_Remove_Dup_UserData.patch
Version: 1.x