arthurfait / python-mplayer

Automatically exported from code.google.com/p/python-mplayer
GNU Lesser General Public License v3.0
0 stars 0 forks source link

MPlayer crashes when using getattr on certain properties #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
#---------------snip------------------
import mplayer
p = mplayer.Player()
for attribute in dir(p):
    getattr(p, attribute)
#---------------snap------------------

What is the expected output? What do you see instead?
  Either nothing if the value of the property can be retrieved or a message in the form "Failed to get value of property %s" % property.
  Instead MPlayer crashes with signal "11" in module "unknown"

What version of the product are you using? On what operating system?
  Machine #1: Python 2.6.6 on Debian 6.6.0 (squeeze) with PyMPlayer-0.6.0 (installed through pip) and MPlayer SVN-r31918 from debian-multimedia.org repository
  Machine #2: Debian unstable with identical Python and PyMPlayer versions, but MPlayer SVN-r33057 from same repository

Please provide any additional information below.
  I was able to fix the problem by adding a list of properties to be excluded to the "_generate_properties(cls)" method in line 190 and not adding those to the class. The list of properties to exclude that I arrived at through trial&error on my machine is as follows:
     exclude = ['capturing','sub', 'sub_demux', 'sub_file', 'sub_source',\
                   'sub_vob', 'switch_program', 'teletext_page',\
                   'tv_brightness', 'tv_contrast', 'tv_hue', 'tv_saturation']

Original issue reported on code.google.com by johannes...@gmail.com on 17 Mar 2011 at 10:58

GoogleCodeExporter commented 9 years ago
This is actually an MPlayer bug. Accessing the 'capturing' property works when 
MPlayer is currently playing a file. I can't just blacklist valid commands and 
properties because doing so will limit functionality, as far as the Python API 
is concerned.

Original comment by daru...@gmail.com on 19 Mar 2011 at 6:12