need to set in_use to EINA_FALSE when destroyed 72/91772/1 accepted/tizen/common/20161011.154344 accepted/tizen/ivi/20161011.234252 accepted/tizen/mobile/20161011.234307 accepted/tizen/tv/20161011.234153 accepted/tizen/wearable/20161011.234207 submit/tizen/20161011.064900
authorBoram Park <boram1288.park@samsung.com>
Tue, 11 Oct 2016 08:36:24 +0000 (17:36 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 11 Oct 2016 08:36:24 +0000 (17:36 +0900)
Change-Id: Ia2d3cf9d59c08aee108f8aca90f2815a2823cab9

src/e_devicemgr_video.c

index 72b5b1e654128d5d4ac014e969d4c24a805c2183..6ff16eab7929d8c6e52b5693ac9d26463f2d373e 100644 (file)
@@ -836,7 +836,10 @@ _e_video_frame_buffer_destroy(E_Video_Fb *vfb)
    if (!vfb) return;
 
    if (vfb->mbuf)
-     e_devmgr_buffer_unref(vfb->mbuf);
+     {
+        vfb->mbuf->in_use = EINA_FALSE;
+        e_devmgr_buffer_unref(vfb->mbuf);
+     }
 
    e_comp_wl_buffer_reference(&vfb->buffer_ref, NULL);
    free (vfb);
@@ -886,6 +889,9 @@ _e_video_frame_buffer_show(E_Video *video, E_Video_Fb *vfb)
 
    if (!vfb)
      {
+        if (video->current_fb && video->current_fb->mbuf)
+          video->current_fb->mbuf->in_use = EINA_FALSE;
+
         tdm_layer_unset_buffer(video->layer);
         tdm_output_commit(video->output, 0, NULL, NULL);
         return EINA_TRUE;
@@ -1447,7 +1453,10 @@ _e_video_render(E_Video *video, const char *func)
    pp_buffer->in_use = EINA_TRUE;
 
    if (tdm_pp_commit(video->pp))
-     goto render_fail;
+     {
+       pp_buffer->in_use = EINA_FALSE;
+       goto render_fail;
+     }
 
    video->old_geo = video->geo;
    video->old_comp_buffer = comp_buffer;