After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 475731 - rtspconnection is able to read incomplete messages
rtspconnection is able to read incomplete messages
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2007-09-11 06:47 UTC by Tommi Myöhänen
Modified: 2007-09-11 19:08 UTC
See Also:
GNOME target: ---
GNOME version: ---

Prevent partial message reading from rtsp connection (4.09 KB, patch)
2007-09-11 06:52 UTC, Tommi Myöhänen
committed Details | Review

Description Tommi Myöhänen 2007-09-11 06:47:30 UTC
Message reading mechanism in gstrtspconnection.c::gst_rtsp_connection_receive() contains multiple gst_rtsp_connection_read() calls which can be interrupted with gst_rtsp_connection_flush() method. This can lead to situation where some data has already been read from connection and then the receive operation is canceled (e.g. when pipeline is paused). Now we have incomplete, partially received RTSP message waiting, and this causes the next gst_rtsp_connection_receive() call to fail with "Parse error".
Comment 1 Tommi Myöhänen 2007-09-11 06:52:17 UTC
Created attachment 95324 [details] [review]
Prevent partial message reading from rtsp connection

Here is one possible solution to this problem. It allows only the first gst_rtsp_connection_read() (renamed to gst_rtsp_connection_read_internal()) call to be interrupted. In other words, if message reading has already been started, it needs to be finished too in order to avoid broken messages.
Comment 2 Wim Taymans 2007-09-11 19:08:27 UTC
        Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>

        * gst-libs/gst/rtsp/gstrtspconnection.c:
        (gst_rtsp_connection_read_internal), (gst_rtsp_connection_read),
        (read_body), (gst_rtsp_connection_receive):
        Make sure we can not cancel in the middle of receiving a message.
        Fixes #475731.