[vlc-devel] [RFC PATCH 08/11] omxil: more error check

Thomas Guillem guillem at archos.com
Tue Jun 24 16:15:10 CEST 2014


---
 modules/codec/omxil/omxil.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index c1ed20d..42df567 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -1257,6 +1257,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
         {
             omx_error = GetPortDefinition(p_dec, &p_sys->out, p_sys->out.p_fmt);
             p_sys->out.b_update_def = 0;
+            CHECK_ERROR(omx_error, "GetPortDefinition failed");
         }
 
         if(p_header->nFilledLen)
@@ -1378,15 +1379,20 @@ reconfig:
         {
             omx_error = PortReconfigure(p_dec, p_port);
             p_port->b_reconfigure = 0;
+            CHECK_ERROR(omx_error, "PortReconfigure failed");
         }
         if(p_port->b_update_def)
         {
             omx_error = GetPortDefinition(p_dec, p_port, p_port->p_fmt);
             p_port->b_update_def = 0;
+            CHECK_ERROR(omx_error, "GetPortDefinition failed");
         }
     }
 
     return p_pic;
+error:
+    p_sys->b_error = true;
+    return NULL;
 }
 
 /*****************************************************************************
@@ -1526,9 +1532,13 @@ reconfig:
         if(!p_port->b_reconfigure) continue;
         p_port->b_reconfigure = 0;
         omx_error = PortReconfigure(p_dec, p_port);
+        CHECK_ERROR(omx_error, "PortReconfigure failed");
     }
 
     return p_buffer;
+error:
+    p_sys->b_error = true;
+    return NULL;
 }
 
 /*****************************************************************************
@@ -1588,6 +1598,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
         if(!p_port->b_reconfigure) continue;
         p_port->b_reconfigure = 0;
         omx_error = PortReconfigure(p_dec, p_port);
+        CHECK_ERROR(omx_error, "PortReconfigure failed");
     }
 
     /* Wait for the decoded frame */
@@ -1626,6 +1637,9 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pic )
 
     msg_Dbg(p_dec, "done");
     return p_block;
+error:
+    p_sys->b_error = true;
+    return NULL;
 }
 
 /*****************************************************************************
-- 
1.7.10.4


-- 


This email and any files transmitted with it are confidential and are 
intended solely for the use of the individual or entity to which they are 
addressed. Access to this e-mail by anyone else is unauthorised. If you are 
not the intended recipient, any disclosure, copying, distribution or any 
action taken or omitted to be taken in reliance on it, is prohibited. 
E-mail messages are not necessarily secure. Archos does not accept 
responsibility for any changes made to this message after it was sent.



More information about the vlc-devel mailing list