Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libmpv: Segfault when setting demuxer property immediately after loadfile command #7919

Closed
jaseg opened this issue Jul 15, 2020 · 1 comment

Comments

@jaseg
Copy link
Contributor

jaseg commented Jul 15, 2020

Important Information

Provide following Information:
mpv version: built from source: v0.32.0-585-gfba1c681b8
Platform: up-to-date Debian 10

Reproduction steps

Using my python libmpv wrapper I get a segfault that seems to be caused by a dead heap canary when I set the demuxer player property immediately after issuing a loadfile command.

$ pip3 install python-mpv

segfault:

import mpv
import time

p = mpv.MPV(log_handler=print, loglevel='debug')

p.play('test.webm') # issues "loadfile test.webm append" via mpv_command

p.demuxer = 'foo' # sets demuxer property via mpv_set_property_string
time.sleep(1000)

no segfault:

import mpv
import time

p = mpv.MPV(log_handler=print, loglevel='debug')

p.play('test.webm') # issues "loadfile test.webm append" via mpv_command

time.sleep(1) # Wait before setting property
p.demuxer = 'foo' # sets demuxer property via mpv_set_property_string
time.sleep(1000)

Expected behavior

No memory corruption. If possible an error message ("hey im busy k thx").

Actual behavior

Program terminates with segmentation fault inside libmpv.

Log file

https://0x0.st/ivZi.txt

Sample files

I used this here but anything else will work too.
https://raw.githubusercontent.com/jaseg/python-mpv/master/test.webm

@jaseg
Copy link
Contributor Author

jaseg commented Jul 17, 2020

Merged with #7920

@jaseg jaseg closed this as completed Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant