summaryrefslogtreecommitdiffstats
path: root/ext/sdl
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2002-07-08 19:36:32 +0000
committerWim Taymans <wim.taymans@gmail.com>2002-07-08 19:36:32 +0000
commitfe3270c356f6b95895f94694317cfa332ab68642 (patch)
treef6404ccf6294a40e3d066d32d323ca5147691d7c /ext/sdl
parentf1f98f06cbe4bbe117fa70187c789c7efc9a2bb5 (diff)
downloadgst-plugins-bad-fe3270c356f6b95895f94694317cfa332ab68642.tar.gz
gst-plugins-bad-fe3270c356f6b95895f94694317cfa332ab68642.tar.bz2
gst-plugins-bad-fe3270c356f6b95895f94694317cfa332ab68642.zip
unref events, do error checking
Original commit message from CVS: unref events, do error checking
Diffstat (limited to 'ext/sdl')
-rw-r--r--ext/sdl/sdlvideosink.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index 244d9a7a..ee6e0b66 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -320,8 +320,10 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
SDL_Event event;
while (SDL_PollEvent(&event));
- if (!gst_sdlvideosink_lock(sdlvideosink))
+ if (!gst_sdlvideosink_lock(sdlvideosink)) {
+ g_message ("could not lock\n");
return FALSE;
+ }
/* Draw bands of color on the raw surface, as run indicator for debugging */
sbuffer = (char *)sdlvideosink->screen->pixels;
@@ -436,7 +438,7 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf)
gst_pad_event_default (pad, event);
break;
}
- gst_event_free (event);
+ gst_event_unref (event);
return;
}
@@ -446,8 +448,10 @@ gst_sdlvideosink_chain (GstPad *pad, GstBuffer *buf)
sdlvideosink->clock, GST_BUFFER_TIMESTAMP (buf), NULL);
}
- if (!gst_sdlvideosink_lock(sdlvideosink))
+ if (!gst_sdlvideosink_lock(sdlvideosink)) {
+ g_message ("could not lock\n");
return;
+ }
/* buf->yuv */
if (sdlvideosink->format == GST_MAKE_FOURCC('I','4','2','0') ||