recreate ximage after try_set_caps suceeds

Original commit message from CVS:
recreate ximage after try_set_caps suceeds
This commit is contained in:
David Schleef 2003-11-11 05:32:09 +00:00
parent 6c8085a74d
commit 430cbd3a9e

View file

@ -396,6 +396,17 @@ gst_ximagesink_handle_xevents (GstXImageSink *ximagesink, GstPad *pad)
"width", GST_PROPS_INT (e.xconfigure.width), "width", GST_PROPS_INT (e.xconfigure.width),
"height", GST_PROPS_INT (e.xconfigure.height), "height", GST_PROPS_INT (e.xconfigure.height),
"framerate", GST_PROPS_FLOAT (30))); "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; break;
case MotionNotify: case MotionNotify:
/* Mouse pointer moved over our window. We send upstream /* Mouse pointer moved over our window. We send upstream