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 787869 - audiovisualizer: mutex unlock added in error case
audiovisualizer: mutex unlock added in error case
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.13.x
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-19 05:46 UTC by Ponnam Srinivas
Modified: 2018-11-03 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
attached patch (925 bytes, text/plain)
2017-09-19 05:46 UTC, Ponnam Srinivas
Details

Description Ponnam Srinivas 2017-09-19 05:46:32 UTC
Created attachment 360023 [details]
attached patch

Hi,

In gst_audio_visualizer_chain function.

Jumps out of a held mutex without unlocking it.

if (!klass->render (scope, inbuf, &outframe)) {
        ret = GST_FLOW_ERROR;
        gst_video_frame_unmap (&outframe);
        goto beach;
Comment 1 Tim-Philipp Müller 2017-09-19 09:08:27 UTC
Thanks for the patch. This is formally correct of course.

I wonder what exactly config_lock protects though (if it's needed), and if it should be held during the call into the subclass at all.
Comment 2 Ponnam Srinivas 2017-09-20 11:17:46 UTC
Can you please commit if patch is correct.
Comment 3 Sebastian Dröge (slomo) 2017-09-20 11:23:03 UTC
First the context / meaning of that mutex has to be understood, maybe the mutex shouldn't be taken at all here.
Comment 4 Sebastian Dröge (slomo) 2017-09-26 08:19:14 UTC
Ponnam, do you want to do some research on that?
Comment 5 Ponnam Srinivas 2017-09-26 08:24:31 UTC
mutex should be unlock when it goes in error case.
Comment 6 Sebastian Dröge (slomo) 2017-09-26 08:30:05 UTC
Yes but that's beside the point. Should it be locked at all here when calling into the subclass, what exactly is it protecting and why?
Comment 7 Ponnam Srinivas 2017-09-26 08:38:35 UTC
yes your right.  will do some research
Comment 8 GStreamer system administrator 2018-11-03 11:59:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/381.