aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch')
-rw-r--r--meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch b/meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch
new file mode 100644
index 00000000..e86f2d4b
--- /dev/null
+++ b/meta-amd-bsp/recipes-multimedia/libomxil/libomxil/0001-Added-NULL-pointer-check-for-failure-scenario.patch
@@ -0,0 +1,34 @@
+From 3eb67fb18c26f6cdf4daf7dc3f987b217315e984 Mon Sep 17 00:00:00 2001
+From: Indrajit Das <indrajit-kumar.das@amd.com>
+Date: Tue, 29 Mar 2016 22:51:13 +0530
+Subject: [PATCH] Added NULL pointer check for failure scenario
+
+---
+ src/base/omx_base_component.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/base/omx_base_component.c b/src/base/omx_base_component.c
+index 4156c37..86c6795 100644
+--- a/src/base/omx_base_component.c
++++ b/src/base/omx_base_component.c
+@@ -1631,12 +1631,17 @@ OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_MessageHandler(OMX_COMPONENTTYP
+ }
+ }
+ else {
++ if(NULL != omx_base_component_Private->ports)
++ {
+ pPort=omx_base_component_Private->ports[message->messageParam];
+ if(omx_base_component_Private->state!=OMX_StateLoaded) {
+ err = pPort->FlushProcessingBuffers(pPort);
+ DEBUG(DEB_LEV_FULL_SEQ, "In %s: Port Flush completed for Comp %s\n",__func__,omx_base_component_Private->name);
+ }
+ err = pPort->Port_DisablePort(pPort);
++ }
++ else
++ printf("Skipping NULL pointer access\n");
+ }
+ /** This condition is added to pass the tests, it is not significant for the environment */
+ if (err != OMX_ErrorNone) {
+--
+2.1.4
+