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 737771 - souphttpclientsink: Stream header buffer lifetime assumptions are incorrect
souphttpclientsink: Stream header buffer lifetime assumptions are incorrect
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.4.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-02 09:01 UTC by Nirbheek Chauhan
Modified: 2014-10-14 07:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix lifetime of stream headers (2.76 KB, patch)
2014-10-02 09:02 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2014-10-02 09:01:43 UTC
Stream headers are updated whenever ::set_caps is called, so we can't assume they'll be valid till the message body is written out. We *can* assume that for queued buffers, but SOUP_MEMORY_STATIC is still wrong for those. 

This false assumption often leads to corrupted stream headers being sent out if a pipeline containing souphttpclientsink is restarted.

The attached patch fixes this.
Comment 1 Nirbheek Chauhan 2014-10-02 09:02:35 UTC
Created attachment 287566 [details] [review]
Fix lifetime of stream headers
Comment 2 Sebastian Dröge (slomo) 2014-10-02 09:51:31 UTC
commit f35f3ccf7c9d659c070a636dbf62ce7d4127053b
Author: Nirbheek Chauhan <nirbheek@centricular.com>
Date:   Thu Oct 2 14:26:08 2014 +0530

    souphttpclientsink: Fix lifetime of stream headers and queued buffers
    
    Stream headers are updated whenever ::set_caps is called, so we can't assume
    they'll be valid before the message body is written out. We *can* assume that
    for queued buffers, but SOUP_MEMORY_STATIC is still wrong for those.
    
    Also, add some debug logging for stream header interactions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737771