From: Stefan Kost Date: Thu, 5 Feb 2009 13:47:00 +0000 (+0200) Subject: xvimagesink: do not call _xwindow_clear on ready->paused. X-Git-Tag: 1.19.3~511^2~10028 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26e4e3dcfecd239a48811e9dbd263b004eab634b;p=platform%2Fupstream%2Fgstreamer.git xvimagesink: do not call _xwindow_clear on ready->paused. Calling clear at that transition does things like stopping xvideo (which is not running at that time) and also clearing anything what the application might have drawn. This breaks handle-expose and autopaint-colorkey features. --- diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index d350633..de827e7 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -277,8 +277,8 @@ beach: xvimage->xvimagesink = NULL; gst_object_unref (xvimagesink); - GST_MINI_OBJECT_CLASS (xvimage_buffer_parent_class)-> - finalize (GST_MINI_OBJECT (xvimage)); + GST_MINI_OBJECT_CLASS (xvimage_buffer_parent_class)->finalize (GST_MINI_OBJECT + (xvimage)); return; @@ -592,14 +592,17 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps) pitches[0] = GST_ROUND_UP_4 (xvimage->width); offsets[1] = offsets[0] + pitches[0] * GST_ROUND_UP_2 (xvimage->height); pitches[1] = GST_ROUND_UP_8 (xvimage->width) / 2; - offsets[2] = offsets[1] + pitches[1] * GST_ROUND_UP_2 (xvimage->height) / 2; + offsets[2] = + offsets[1] + pitches[1] * GST_ROUND_UP_2 (xvimage->height) / 2; pitches[2] = GST_ROUND_UP_8 (pitches[0]) / 2; - expected_size = offsets[2] + pitches[2] * GST_ROUND_UP_2 (xvimage->height) / 2; + expected_size = + offsets[2] + pitches[2] * GST_ROUND_UP_2 (xvimage->height) / 2; for (plane = 0; plane < xvimage->xvimage->num_planes; plane++) { - GST_DEBUG_OBJECT (xvimagesink, "Plane %u has a expected pitch of %d bytes, " - "offset of %d", plane, pitches[plane], offsets[plane]); + GST_DEBUG_OBJECT (xvimagesink, + "Plane %u has a expected pitch of %d bytes, " "offset of %d", + plane, pitches[plane], offsets[plane]); } break; } @@ -2206,10 +2209,6 @@ gst_xvimagesink_change_state (GstElement * element, GstStateChange transition) gst_xvimagesink_update_colorbalance (xvimagesink); break; case GST_STATE_CHANGE_READY_TO_PAUSED: - g_mutex_lock (xvimagesink->flow_lock); - if (xvimagesink->xwindow) - gst_xvimagesink_xwindow_clear (xvimagesink, xvimagesink->xwindow); - g_mutex_unlock (xvimagesink->flow_lock); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break;