summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-08-01 08:41:53 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-08-01 08:41:53 +0000
commita0970878ccbd2df8299e04d8462d32f87c667788 (patch)
treece92a97942e7a1942c94b6e655d6713f7f28c1f0
parent951a9d2327d9acaa464577c021d2d846f028fd56 (diff)
emotion: prevent race condition during gstreamer module shutdown or file set.
Patch by Sohyun Kim <anna1014.kim@samsung.com> SVN revision: 74719
-rw-r--r--legacy/emotion/ChangeLog9
-rw-r--r--legacy/emotion/NEWS3
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_sink.c14
3 files changed, 23 insertions, 3 deletions
diff --git a/legacy/emotion/ChangeLog b/legacy/emotion/ChangeLog
index 9329acf180..3d5d4586a9 100644
--- a/legacy/emotion/ChangeLog
+++ b/legacy/emotion/ChangeLog
@@ -29,6 +29,11 @@
292012-07-03 Cedric Bail 292012-07-03 Cedric Bail
30 30
31 * Track pending object for proper shutdown. 31 * Track pending object for proper shutdown.
322012-06-05 Sohyun Kim
33 32
34 * Add fimcconvert element to resize and convert color using fimc on device 332012-06-05 Sohyun Kim
34
35 * Add fimcconvert element to resize and convert color using fimc on device.
36
372012-08-01 Cedric Bail
38
39 * Fix race condition in gstreamer render function.
diff --git a/legacy/emotion/NEWS b/legacy/emotion/NEWS
index fa32d20257..7778956e50 100644
--- a/legacy/emotion/NEWS
+++ b/legacy/emotion/NEWS
@@ -12,7 +12,8 @@ Additions:
12 12
13Fixes: 13Fixes:
14 - build out of tree. 14 - build out of tree.
15 - stride of all YUV video. 15 - stride of all YUV video
16 - fix race condition in gstreamer render function on shutdown and file set.
16 17
17Improvements: 18Improvements:
18 19
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_sink.c b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
index 6cc617ba50..b9e2e748b5 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_sink.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
@@ -498,6 +498,13 @@ evas_video_sink_samsung_main_render(void *data)
498 buffer = send->frame; 498 buffer = send->frame;
499 preroll = send->preroll; 499 preroll = send->preroll;
500 500
501 /* frame after cleanup */
502 if (!preroll && !send->ev->last_buffer)
503 {
504 priv = NULL;
505 goto exit_point;
506 }
507
501 if (!priv || !priv->o || priv->unlocked) 508 if (!priv || !priv->o || priv->unlocked)
502 goto exit_point; 509 goto exit_point;
503 510
@@ -630,6 +637,13 @@ evas_video_sink_main_render(void *data)
630 preroll = send->preroll; 637 preroll = send->preroll;
631 ev = send->ev; 638 ev = send->ev;
632 639
640 /* frame after cleanup */
641 if (!preroll && !ev->last_buffer)
642 {
643 priv = NULL;
644 goto exit_point;
645 }
646
633 if (!priv || !priv->o || priv->unlocked) 647 if (!priv || !priv->o || priv->unlocked)
634 goto exit_point; 648 goto exit_point;
635 649