mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
recreate ximage after try_set_caps suceeds
Original commit message from CVS: recreate ximage after try_set_caps suceeds
This commit is contained in:
parent
6c8085a74d
commit
430cbd3a9e
1 changed files with 11 additions and 0 deletions
|
@ -396,6 +396,17 @@ gst_ximagesink_handle_xevents (GstXImageSink *ximagesink, GstPad *pad)
|
|||
"width", GST_PROPS_INT (e.xconfigure.width),
|
||||
"height", GST_PROPS_INT (e.xconfigure.height),
|
||||
"framerate", GST_PROPS_FLOAT (30)));
|
||||
ximagesink->width = e.xconfigure.width;
|
||||
ximagesink->height = e.xconfigure.height;
|
||||
if ( (ximagesink->ximage) &&
|
||||
( (ximagesink->width != ximagesink->ximage->width) ||
|
||||
(ximagesink->height != ximagesink->ximage->height) ) ) {
|
||||
/* We renew our ximage only if size changed */
|
||||
gst_ximagesink_ximage_destroy (ximagesink, ximagesink->ximage);
|
||||
|
||||
ximagesink->ximage = gst_ximagesink_ximage_new (ximagesink,
|
||||
ximagesink->width, ximagesink->height);
|
||||
}
|
||||
break;
|
||||
case MotionNotify:
|
||||
/* Mouse pointer moved over our window. We send upstream
|
||||
|
|
Loading…
Reference in a new issue