emotion: prevent race condition during gstreamer module shutdown or file set.
authorcedric <cedric>
Wed, 1 Aug 2012 08:41:53 +0000 (08:41 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 1 Aug 2012 08:41:53 +0000 (08:41 +0000)
Patch by Sohyun Kim <anna1014.kim@samsung.com>

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/emotion@74719 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
NEWS
src/modules/gstreamer/emotion_sink.c

index 9329acf..3d5d458 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2012-07-03  Cedric Bail
 
        * Track pending object for proper shutdown.
-2012-06-05 Sohyun Kim
 
-       * Add fimcconvert element to resize and convert color using fimc on device
+2012-06-05  Sohyun Kim
+
+       * Add fimcconvert element to resize and convert color using fimc on device.
+
+2012-08-01  Cedric Bail
+
+       * Fix race condition in gstreamer render function.
diff --git a/NEWS b/NEWS
index fa32d20..7778956 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,7 +12,8 @@ Additions:
 
 Fixes:
        - build out of tree.
-       - stride of all YUV video.
+       - stride of all YUV video
+       - fix race condition in gstreamer render function on shutdown and file set.
 
 Improvements:
 
index 6cc617b..b9e2e74 100644 (file)
@@ -498,6 +498,13 @@ evas_video_sink_samsung_main_render(void *data)
    buffer = send->frame;
    preroll = send->preroll;
 
+   /* frame after cleanup */
+   if (!preroll && !send->ev->last_buffer)
+     {
+        priv = NULL;
+        goto exit_point;
+     }
+
    if (!priv || !priv->o || priv->unlocked)
      goto exit_point;
 
@@ -630,6 +637,13 @@ evas_video_sink_main_render(void *data)
    preroll = send->preroll;
    ev = send->ev;
 
+   /* frame after cleanup */
+   if (!preroll && !ev->last_buffer)
+     {
+        priv = NULL;
+        goto exit_point;
+     }
+
    if (!priv || !priv->o || priv->unlocked)
      goto exit_point;