Skip to content

Commit

Permalink
player.gstreamer: do not try to call ensure_native if it is not there
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Sep 2, 2024
1 parent 6a6b556 commit 1bf8913
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/advene/player/gstreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ def set_widget(self, widget, container):
if config.data.os == "win32":
# From
# http://stackoverflow.com/questions/25823541/get-the-window-handle-in-pygi
if not widget.ensure_native():
# We check for ensure_native since win32 gtk3 DrawingArea seems to miss this method.
if hasattr(widget, 'ensure_native') and not widget.ensure_native():
logger.error("Cannot embed video player - it requires a native window")
return
ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
Expand Down

0 comments on commit 1bf8913

Please sign in to comment.