Fixing "g_ptr_array_set_size" crash. 71/44071/2 submit/tizen/20150729.072849
authorBarun Kumar Singh <barun.singh@samsung.com>
Thu, 16 Jul 2015 08:05:44 +0000 (13:35 +0530)
committerBarun Kumar Singh <barun.singh@samsung.com>
Mon, 20 Jul 2015 04:29:45 +0000 (09:59 +0530)
Increasing omx elements priority.
Signed-off-by: Barun Kumar Singh <barun.singh@samsung.com>
Change-Id: I388fa4d7bd3da9c60ed30fd4659815e5356a011b

config/odroid/gstomx.conf
omx/gstomxvideodec.c

index 571e378..0106ef2 100755 (executable)
@@ -2,7 +2,7 @@
 type-name=GstOMXMPEG2VideoDec
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.MPEG2.Decoder
-rank=256
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -11,7 +11,7 @@ hacks=no-component-role
 type-name=GstOMXMPEG4VideoDec
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.MPEG4.Decoder
-rank=256
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -20,7 +20,7 @@ hacks=no-component-role
 type-name=GstOMXH263Dec
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.H263.Decoder
-rank=256
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -29,7 +29,7 @@ hacks=no-component-role
 type-name=GstOMXH264Dec
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.AVC.Decoder
-rank=257
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -48,7 +48,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt
 type-name=GstOMXH264Enc
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.AVC.Encoder
-rank=257
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -57,7 +57,7 @@ hacks=no-component-role
 type-name=GstOMXMPEG4VideoEnc
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.MPEG4.Encoder
-rank=254
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
@@ -66,7 +66,7 @@ hacks=no-component-role
 type-name=GstOMXH263Enc
 core-name=/usr/lib/libExynosOMX_Core.so
 component-name=OMX.Exynos.H263.Encoder
-rank=254
+rank=258
 in-port-index=0
 out-port-index=1
 hacks=no-component-role
index c8600ed..fa6ba79 100644 (file)
@@ -269,7 +269,8 @@ gst_omx_buffer_pool_stop (GstBufferPool * bpool)
   GstOMXBufferPool *pool = GST_OMX_BUFFER_POOL (bpool);
 
   /* Remove any buffers that are there */
-  g_ptr_array_set_size (pool->buffers, 0);
+  if(pool->buffers)
+      g_ptr_array_set_size (pool->buffers, 0);
 
   if (pool->caps)
     gst_caps_unref (pool->caps);