Valid id checking for callbackmsg[id]).row_mode in process()

In VIDDEC3_process or VIDENC2_process, if low latency is used, then
id will have a valid value of >= 0.
When full frame is used, after process call, there is a condition
check of callbackmsg[id]).row_mode. Problem is that id might not be valid
for full frame. With id value < 0, the value in callbackmsg[id]).row_mode
can be guarantee to be correct. Issue is found when id = -1 and the value
of callbackmsg[-1]).row_mode points to less than 0, which causes the
condition to pass.

This commit is fixing the issue by adding additional check to make sure
id is >= 0 when calling callbackmsg[id]).row_mode so that the
condition check will be valid to determine low latency mode or full
frame mode after process().

Change-Id: I93209e4da42305e807824565bf676c8bdd33d72a
Signed-off-by: Buddy Liong <buddy.liong@ti.com>
diff --git a/libdce.c b/libdce.c
index 9c7a605..583b4d7 100644
--- a/libdce.c
+++ b/libdce.c
@@ -1175,7 +1175,7 @@
     ret = process(codec, inBufs, outBufs, inArgs, outArgs, OMAP_DCE_VIDDEC3);
     DEBUG("<< ret=%d", ret);
 
-    if( (callbackmsg[id]).row_mode ) {
+    if( (id >= 0) && ((callbackmsg[id]).row_mode) ) {
         DEBUG("(callbackmsg[%d]).receive_numBlocks %d >= (callbackmsg[%d]).total_numBlocks %d",
             id, (callbackmsg[id]).receive_numBlocks, id, (callbackmsg[id]).total_numBlocks);
 
@@ -1386,7 +1386,7 @@
     ret = process(codec, inBufs, outBufs, inArgs, outArgs, OMAP_DCE_VIDENC2);
     DEBUG("<< ret=%d", ret);
 
-    if( (callbackmsg[id]).row_mode ) {
+    if( (id >= 0) && ((callbackmsg[id]).row_mode) ) {
         /* Stop the callback to request to client */
         DEBUG("Stop the callback to client callbackmsg[%d]->getDataFlag %d", id, (callbackmsg[id]).getDataFlag);
         (callbackmsg[id]).getDataFlag = 0;