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 602556 - x264enc and ffenc upstream GstForceKeyUnit handling are not thread-safe
x264enc and ffenc upstream GstForceKeyUnit handling are not thread-safe
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-21 03:14 UTC by Olivier Crête
Modified: 2009-11-22 06:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ffenc: Make keyframe forcing thread-safe (3.31 KB, patch)
2009-11-21 03:14 UTC, Olivier Crête
committed Details | Review
x264enc: Make upstream GstForceKeyUnit thread-safe (4.23 KB, patch)
2009-11-21 03:15 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2009-11-21 03:14:14 UTC
The implementation of GstForceKeyUnit in both of these elements are not thread safe (since the element reading the modified variable is very likely in another thread).

Also, I implemented pushed back a GstForceKeyUnit event downstream in both (like theoraenc already does). That will allow muxers and payloaders to react to it (the next step is to make the h264 payload resend the PPS/SPS in the downstream event).
Comment 1 Olivier Crête 2009-11-21 03:14:52 UTC
Created attachment 148208 [details] [review]
ffenc: Make keyframe forcing thread-safe

Make the keyframe forcing thread-safe, also emit a downstream event
to allow muxers or payloaders to react appropriately.
Comment 2 Olivier Crête 2009-11-21 03:15:23 UTC
Created attachment 148209 [details] [review]
x264enc: Make upstream GstForceKeyUnit thread-safe

Also send the GstForceKeyUnit event downstream when an upstream on is received,
allowing muxers or payloaders to take appropriate actions.
Comment 3 Sebastian Dröge (slomo) 2009-11-21 06:43:33 UTC
Looks good, please commit :)
Comment 4 Olivier Crête 2009-11-22 06:07:22 UTC
Comment on attachment 148208 [details] [review]
ffenc: Make keyframe forcing thread-safe

commit b69fcc471ea268587a8796ddffc888f321933d0a
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Fri Nov 20 21:46:33 2009 -0500

    ffenc: Make keyframe forcing thread-safe
    
    Make the keyframe forcing thread-safe, also emit a downstream event
    to allow muxers or payloaders to react appropriately.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=602556
Comment 5 Olivier Crête 2009-11-22 06:07:41 UTC
Comment on attachment 148209 [details] [review]
x264enc: Make upstream GstForceKeyUnit thread-safe

commit b7f37f9afbd98a6d3ee800e9f87c4d85fff0cc5b
Author: Olivier Crête <olivier.crete@collabora.co.uk>
Date:   Fri Nov 20 21:32:31 2009 -0500

    x264enc: Make upstream GstForceKeyUnit thread-safe
    
    Also send the GstForceKeyUnit event downstream when an upstream on is received,
    allowing muxers or payloaders to take appropriate actions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=602556
Comment 6 Olivier Crête 2009-11-22 06:08:34 UTC
Patches merged