From 111dec9b3d3d5bb408cb24fb538c6c77a8bdd8bb Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Fri, 27 May 2011 10:38:49 +0000 Subject: [PATCH] * morituri/common/gstreamer.py: In -bad the plugin is called audioparsersbad. --- ChangeLog | 5 +++++ morituri/common/gstreamer.py | 27 +++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 650fb49..78e153d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-27 Thomas Vander Stichele + + * morituri/common/gstreamer.py: + In -bad the plugin is called audioparsersbad. + 2011-05-25 Thomas Vander Stichele * morituri/common/gstreamer.py: diff --git a/morituri/common/gstreamer.py b/morituri/common/gstreamer.py index 5d2b119..90b8eea 100644 --- a/morituri/common/gstreamer.py +++ b/morituri/common/gstreamer.py @@ -174,19 +174,22 @@ class GstPipelineTask(task.Task): # workaround for issue #64 def removeAudioParsers(): + log.debug('gstreamer', 'Removing buggy audioparsers plugin if needed') + import gst registry = gst.registry_get_default() + + plugin = registry.find_plugin("audioparsersbad") + if plugin: + # always remove from bad + log.debug('gstreamer', 'removing audioparsersbad plugin from registry') + registry.remove_plugin(plugin) + plugin = registry.find_plugin("audioparsers") - if not plugin: - return + if plugin: + log.debug('gstreamer', 'Found audioparsers plugin from %s %s', + plugin.get_source(), plugin.get_version()) - log.debug('gstreamer', 'Found audioparsers plugin from %s %s', - plugin.get_source(), plugin.get_version()) - - if plugin.get_source() == 'gst-plugins-good' \ - and plugin.get_version() > '0.10.29.1': - return - - # always remove from bad - log.debug('gstreamer', 'removing audioparsers plugin from registry') - registry.remove_plugin(plugin) + if plugin.get_source() == 'gst-plugins-good' \ + and plugin.get_version() > '0.10.29.1': + return