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 525613 - [wildmidi] [PATCH] initializes library multiple times
[wildmidi] [PATCH] initializes library multiple times
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.7
Other Linux
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-01 18:45 UTC by Emilio Pozuelo Monfort
Modified: 2008-07-28 22:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Just a diff file (598 bytes, patch)
2008-06-11 00:51 UTC, Sonicadvance1
none Details | Review
new Diff file (1.45 KB, patch)
2008-06-11 00:56 UTC, Sonicadvance1
none Details | Review

Description Emilio Pozuelo Monfort 2008-04-01 18:45:54 UTC
Reported at https://launchpad.net/bugs/208068

gst-plugins-bad 0.10.6

Playing a midi file in Totem works fine, but when it finish it says that I have no codec to play the file.

"The playback of this movie requires a audio/midi decoder plugin which is not installed."

Sebastian Dröge has told me he believes this is caused by wildmidi reporting a wrong error.

To reproduce, play a midi file with Totem, wait until the file is reproduced, and in the end it will popup the error dialog.
Comment 1 Sonicadvance1 2008-06-10 13:24:49 UTC
I can confirm this with the latest version of gst-plugins-bad version 0.10.7 when using the wildmidi midi playing element. The seems to be because it calls WildMidi_Init(...) each time a song is played, but it should only be called once during the lifetime of the program.
Comment 2 Sonicadvance1 2008-06-11 00:51:32 UTC
Created attachment 112517 [details] [review]
Just a diff file

Here is a diff file that fixes this annoying bug. Don't be mad if it isn't good enough for gstreamer's standards. It is obviously for ext/timidity/gstwildmidi.c
Comment 3 Sonicadvance1 2008-06-11 00:56:09 UTC
Created attachment 112518 [details] [review]
new Diff file

New Patch that uses diff -u
Comment 4 Sebastian Dröge (slomo) 2008-06-11 07:58:41 UTC
Thanks, I've committed a similar change to CVS now. I'm initing wildimidi in the plugin initialization now and if it fails don't register the element at all.

2008-06-11  Sebastian Dröge  <slomo@circular-chaos.org>

        Based on a patch by:  Sonicadvance1 at GMAIL dot COM

        * ext/timidity/gstwildmidi.c: (gst_wildmidi_init),
        (gst_wildmidi_change_state), (plugin_init):
        * ext/timidity/gstwildmidi.h:
        Initialize wildmidi only once in the plugin init function instead
        of once for every instance. The second and following calls to the
        wildmidi initialization function will fail. Fixes bug #525613.

        Also don't register the element at all if wildmidi initialization
        fails.
Comment 5 Jan Schmidt 2008-07-28 22:20:42 UTC
Can we please get real names and not just an email address? I think it's a bad idea to only have an email address for even trivial patches.