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 584291 - Cannot create elements after calling gst_update_registry
Cannot create elements after calling gst_update_registry
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.10.8
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-30 14:35 UTC by Jordi Mas
Modified: 2009-06-05 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Shows the problem (1.10 KB, text/plain)
2009-05-30 14:36 UTC, Jordi Mas
  Details
Proposed patch for the bug (5.17 KB, patch)
2009-05-30 14:37 UTC, Jordi Mas
committed Details | Review

Description Jordi Mas 2009-05-30 14:35:44 UTC
Hello,

The file bug.c shows a problem with the current gst-ffmpeg. 

If the same instance of the plugin is asked to be initialised more that once, instances after the first one do not register the elements properly and the elements become not usable.

For example, if you call gst_update_registry (), is not possible to create elements after the call since the plugin is asked to be initialised again and does not register the elements.

Runing the attached case returns these values:

Creating element ffenc_mpeg2video->a222bf8
Creating element ffdec_mpeg2video->a225048
Creating element ffmux_dvd->a226000
calls gst_update_registry
Creating element ffenc_mpeg2video->0
Creating element ffdec_mpeg2video->0
Creating element ffmux_dvd->0

Changing the sample muxer, encoder and decoder for similar Ogg ones do work as expected.

Attached to this report you have the file to show the issue and proposed patch to fix it.

Jordi Mas
jmas@softcatala.org
Comment 1 Jordi Mas 2009-05-30 14:36:31 UTC
Created attachment 135618 [details]
Shows the problem
Comment 2 Jordi Mas 2009-05-30 14:37:38 UTC
Created attachment 135619 [details] [review]
Proposed patch for the bug
Comment 3 Wim Taymans 2009-06-05 11:21:56 UTC
commit cfbb046f1e73e5b27c3436120660f27bacc7d6c4
Author: Jordi Mas <jordimash at gmail.com>
Date:   Fri Jun 5 13:19:03 2009 +0200

    ffmpeg: make elements reusable after registry rescan
    
    If the same instance of the plugin is asked to be initialised more that once,
    instances after the first one do not register the elements properly and the
    elements become not usable.
    
    For example, if you call gst_update_registry (), is not possible to create
    elements after the call since the plugin is asked to be initialised again and
    does not register the elements.
    
    Fixes #584291

commit 6d643a134e88c2cff1672bd1e72ebcb0dbe8b969
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri Jun 5 13:17:09 2009 +0200

    check: add registry rescan test