xvimagesink: catch XWindows errors when destroying xwindow
Submitted by Dirk Van Haerenborgh
Link to original bug (#729088)
Description
Created attachment 275302
proposed patch
When passing a window handle to xvimagesink, the whole application will abruptly exit when the window handle becomes invalid at some point.
This happens, for instance, when the drawingarea owning the window handle is managed by a different process. If that process is killed, the window handle becomes invalid immediately.
The proposed patch will catch the Xerrors generated when rendering to an xwindow whose handle is gone, and signal a flow error. Also, Xerrors are caught while destroying the xvcontext, and replaced by GStreamer errors.
This enables the user to act on these errors, rather than having the application quit immediately.
Patch 275302, "proposed patch":
handle_xwindow_errors.patch