raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0d7b967f45a9f1f4bd392fff4b69a9fca70616e5

commit 0d7b967f45a9f1f4bd392fff4b69a9fca70616e5
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sat Oct 7 18:24:29 2017 +0900

    emotion gst1 - handle null imagwe data returrn and dont crash
    
    fix crash i spotted thanks to getting img obbj data returning null.
    @fix
---
 src/modules/emotion/gstreamer1/emotion_sink.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/modules/emotion/gstreamer1/emotion_sink.c 
b/src/modules/emotion/gstreamer1/emotion_sink.c
index a4f768cd27..f0bc0ef427 100644
--- a/src/modules/emotion/gstreamer1/emotion_sink.c
+++ b/src/modules/emotion/gstreamer1/emotion_sink.c
@@ -428,6 +428,7 @@ emotion_video_sink_main_render(void *data)
      {
         if (!gst_buffer_map(buffer, &map, GST_MAP_READ))
           {
+             gst_buffer_unref(buffer);
              ERR("Cannot map video buffer for read.\n");
              goto exit_point;
           }
@@ -440,6 +441,21 @@ emotion_video_sink_main_render(void *data)
    evas_object_image_size_set(priv->evas_object, send->info.width, 
send->eheight);
 
    evas_data = evas_object_image_data_get(priv->evas_object, 1);
+   if (!evas_data)
+     {
+        if (!send->vfmapped)
+          {
+             gst_buffer_unmap(buffer, &map);
+             priv->mapped = EINA_FALSE;
+          }
+        else
+          {
+             gst_video_frame_unmap(buffer);
+             priv->vfmapped = EINA_FALSE;
+          }
+        gst_buffer_unref(buffer);
+        goto exit_point;
+     }
 
 // XXX: need to handle GstVideoCropMeta to get video cropping right
 // XXX: can't get crop meta from buffer (always null)

-- 


Reply via email to