mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
unref events, do error checking
Original commit message from CVS: unref events, do error checking
This commit is contained in:
parent
f1f98f06cb
commit
fe3270c356
1 changed files with 7 additions and 3 deletions
|
@ -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') ||
|
||||
|
|
Loading…
Reference in a new issue