libmix: Distinguish fatal decoder errors from other decoder status

BZ: 4192

For decoder errors that are not fatal, the decoder client could continue to decode without
complaining the abnormal issues. Add logics to distinguish fatal errors from those that
could be omitted.

Change-Id: I4ea66c91f34ea7c4ae9477339aae996168f52b0d
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
diff --git a/videodecoder/VideoDecoderDefs.h b/videodecoder/VideoDecoderDefs.h
index 40754ab..ccf3b46 100644
--- a/videodecoder/VideoDecoderDefs.h
+++ b/videodecoder/VideoDecoderDefs.h
@@ -163,5 +163,17 @@
 #define NULL 0
 #endif
 
+inline bool checkFatalDecoderError(Decode_Status status) {
+    if (status == DECODE_NOT_STARTED ||
+        status == DECODE_NEED_RESTART ||
+        status == DECODE_NO_PARSER ||
+        status == DECODE_INVALID_DATA ||
+        status == DECODE_MEMORY_FAIL ||
+        status == DECODE_FAIL) {
+        return true;
+    } else {
+        return false;
+    }
+}
 
 #endif  // VIDEO_DECODER_DEFS_H_