Add more checks to detect certain process call errors and exit
authorPooja Prajod <a0132412@ti.com>
Thu, 11 Feb 2016 11:48:58 +0000 (17:18 +0530)
committerPooja Prajod <a0132412@ti.com>
Thu, 11 Feb 2016 14:44:56 +0000 (20:14 +0530)
DCE_EXDM_UNSUPPORTED, DCE_EIPC_CALL_FAIL and  DCE_EINVALID_INPUT signifies that the
application needs to free the resources and exit.

Signed-off-by: Pooja Prajod <a0132412@ti.com>
viddec3test.c

index e26321036df87b501b05b94dbad192ec2c3f309e..984334a771d201e9f53a61140a1563eaac8eebfb 100644 (file)
@@ -322,7 +322,6 @@ decoder_process(struct decoder *decoder)
        XDAS_Int32 err;
        int eof = 0; /* end of file flag */
 
-
        /* demux; in loop mode, we can do two tries at the end of the stream. */
        for (i = 0; i < 2; i++) {
                n = demux_read(decoder->demux, decoder->input, decoder->input_sz);
@@ -402,7 +401,7 @@ decoder_process(struct decoder *decoder)
                        if (err) {
                                ERROR("%p: process returned error: %d", decoder, err);
                                ERROR("%p: extendedError: %08x", decoder, outArgs->extendedError);
-                               if (XDM_ISFATALERROR(outArgs->extendedError))
+                               if (XDM_ISFATALERROR(outArgs->extendedError) || ( err == DCE_EXDM_UNSUPPORTED ) || ( err == DCE_EIPC_CALL_FAIL ) || ( err == DCE_EINVALID_INPUT ))
                                        return -1;
                        }
                }