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 593955 - rtpjitterbuffer: clock_rate can change between its check and its use
rtpjitterbuffer: clock_rate can change between its check and its use
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-02 19:23 UTC by Olivier Crête
Modified: 2009-09-03 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Lock the clock rate variable (3.84 KB, patch)
2009-09-02 19:23 UTC, Olivier Crête
none Details | Review

Description Olivier Crête 2009-09-02 19:23:31 UTC
Created attachment 142347 [details] [review]
Lock the clock rate variable

The priv->clock_rate variable could become -1 between when its checked to not
be -1 and when its used, causing an assertion. Attached patch fixes that by
taking the mutex earlier in the chain() function and locking other changes to
the clock_rate variable.

Also in _loop(), it uses the clock_rate() without checking if its not -1, but I
guess thats for rtsp, so it doesn't matter.
Comment 1 Wim Taymans 2009-09-03 17:26:24 UTC
commit f542f710cfa2bc893417f469b127e467744adbf7
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Wed Sep 2 15:21:02 2009 -0400

    rtpjitterbuffer: Lock clock_rate variable
    
    The priv->clock_rate variable could become -1 between when its checked to not
    be -1 and when its used, causing an assertion. Fixed by taking the mutex
    earlier in the chain() function.
    
    Fixes #593955