From 771b0248e7c1c1114fb62f412e1f7aceabca2b90 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 22 Sep 2004 15:03:08 +0000 Subject: [PATCH] ext/gdk_pixbuf/pixbufscale.c: Correct caps negotiation Original commit message from CVS: * ext/gdk_pixbuf/pixbufscale.c: (gst_pixbufscale_getcaps): Correct caps negotiation * gst/volume/gstvolume.c: (volume_chain_float), (volume_chain_int16): Modify debug output to be little more informative * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), (gst_xvimagesink_xvimage_destroy): Add XSync calls after detaching from the shared memory segment to avoid a crash. --- ChangeLog | 13 +++++++++++++ gst/volume/gstvolume.c | 4 +++- sys/ximage/ximagesink.c | 5 +++++ sys/xvimage/xvimagesink.c | 6 ++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 31fcff5546..06c49d0d69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-09-23 Jan Schmidt + + * ext/gdk_pixbuf/pixbufscale.c: (gst_pixbufscale_getcaps): + Correct caps negotiation + * gst/volume/gstvolume.c: (volume_chain_float), + (volume_chain_int16): + Modify debug output to be little more informative + * sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls): + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls), + (gst_xvimagesink_xvimage_destroy): + Add XSync calls after detaching from the shared memory segment to + avoid a crash. + 2004-09-22 Zaheer Abbas Merali * ext/ogg/gstoggmux.c: (gst_ogg_mux_init), diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index b1363ffb57..b375643278 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -421,6 +421,8 @@ volume_chain_float (GstPad * pad, GstData * _data) filter = GST_VOLUME (GST_OBJECT_PARENT (pad)); g_return_if_fail (GST_IS_VOLUME (filter)); + GST_LOG_OBJECT (filter, "processing incoming float buffer with refcount %d", + GST_BUFFER_REFCOUNT_VALUE (buf)); out_buf = gst_buffer_copy_on_write (buf); data = (gfloat *) GST_BUFFER_DATA (out_buf); @@ -453,7 +455,7 @@ volume_chain_int16 (GstPad * pad, GstData * _data) filter = GST_VOLUME (GST_OBJECT_PARENT (pad)); g_return_if_fail (GST_IS_VOLUME (filter)); - GST_LOG_OBJECT (filter, "processing incoming buffer with refcount %d", + GST_LOG_OBJECT (filter, "processing incoming int16 buffer with refcount %d", GST_BUFFER_REFCOUNT_VALUE (buf)); out_buf = gst_buffer_copy_on_write (buf); diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index d8a82f9287..8833ac3fc3 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -153,9 +153,14 @@ gst_ximagesink_check_xshm_calls (GstXContext * xcontext) XSync (xcontext->disp, 0); XShmDetach (xcontext->disp, &ximage->SHMInfo); + XSync (xcontext->disp, FALSE); + shmdt (ximage->SHMInfo.shmaddr); shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0); + /* To be sure, reset the SHMInfo entry */ + ximage->SHMInfo.shmaddr = ((void *) -1); + /* store whether we succeeded in result and reset error_caught */ result = !error_caught; error_caught = FALSE; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index e22067ae64..3790872631 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -163,9 +163,14 @@ gst_xvimagesink_check_xshm_calls (GstXContext * xcontext) XSync (xcontext->disp, 0); XShmDetach (xcontext->disp, &xvimage->SHMInfo); + XSync (xcontext->disp, FALSE); + shmdt (xvimage->SHMInfo.shmaddr); shmctl (xvimage->SHMInfo.shmid, IPC_RMID, 0); + /* To be sure, reset the SHMInfo entry */ + ximage->SHMInfo.shmaddr = ((void *) -1); + /* store whether we succeeded in result and reset error_caught */ result = !error_caught; error_caught = FALSE; @@ -289,6 +294,7 @@ gst_xvimagesink_xvimage_destroy (GstXvImageSink * xvimagesink, if (xvimagesink->xcontext->use_xshm) { if (xvimage->SHMInfo.shmaddr != ((void *) -1)) { XShmDetach (xvimagesink->xcontext->disp, &xvimage->SHMInfo); + XSync (xvimagesink->xcontext->disp, FALSE); shmdt (xvimage->SHMInfo.shmaddr); } if (xvimage->SHMInfo.shmid > 0)