diff options
author | Pooja Prajod | 2016-02-11 03:58:58 -0600 |
---|---|---|
committer | Pooja Prajod | 2016-02-11 07:06:39 -0600 |
commit | ad820469f8acd470487cae13dbbdd0e62e9268ef (patch) | |
tree | a11ba8cf9bbc327507d8ee80882ce34217bf387c | |
parent | 202da907a87904e0c4f42a44afc6f39f31832406 (diff) | |
download | gst-plugin-ducati-ad820469f8acd470487cae13dbbdd0e62e9268ef.tar.gz gst-plugin-ducati-ad820469f8acd470487cae13dbbdd0e62e9268ef.tar.xz gst-plugin-ducati-ad820469f8acd470487cae13dbbdd0e62e9268ef.zip |
Exit application with cleanup for certain process call errors
Certain process call return values signify underlying layer crash. In such cases playback would fail
and there is no point of subsequent process calls unless restart and resume logic is not implemented.
The codec_process return value is matched with DCE_EXDM_UNSUPPORTED, DCE_EIPC_CALL_FAIL, DCE_EINVALID_INPUT
and matched with FAIL case to cleanup and exit.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
-rw-r--r-- | src/gstducatividdec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c index 7fd033d..de26d27 100644 --- a/src/gstducatividdec.c +++ b/src/gstducatividdec.c | |||
@@ -731,6 +731,13 @@ skip_outbuf_processing: | |||
731 | codec_unlock_outbuf (self, self->outArgs->freeBufID[i]); | 731 | codec_unlock_outbuf (self, self->outArgs->freeBufID[i]); |
732 | } | 732 | } |
733 | 733 | ||
734 | if (err == XDM_EFAIL) { | ||
735 | codec_delete (self); | ||
736 | self->codec = NULL; | ||
737 | engine_close (self); | ||
738 | exit (0); | ||
739 | } | ||
740 | |||
734 | return err; | 741 | return err; |
735 | } | 742 | } |
736 | 743 | ||
@@ -1026,7 +1033,8 @@ static gint | |||
1026 | gst_ducati_viddec_handle_error (GstDucatiVidDec * self, gint ret, | 1033 | gst_ducati_viddec_handle_error (GstDucatiVidDec * self, gint ret, |
1027 | gint extended_error, gint status_extended_error) | 1034 | gint extended_error, gint status_extended_error) |
1028 | { | 1035 | { |
1029 | if (XDM_ISFATALERROR (extended_error)) | 1036 | if (XDM_ISFATALERROR (extended_error) || (ret == DCE_EXDM_UNSUPPORTED) |
1037 | || (ret == DCE_EIPC_CALL_FAIL) || (ret == DCE_EINVALID_INPUT)) | ||
1030 | ret = XDM_EFAIL; | 1038 | ret = XDM_EFAIL; |
1031 | else | 1039 | else |
1032 | ret = XDM_EOK; | 1040 | ret = XDM_EOK; |