Viddec3test: Fix flush issue in co-planar buffers.
authorPradeep Venkatasubbarao <pradeepv@ti.com>
Fri, 21 Mar 2014 06:38:18 +0000 (12:08 +0530)
committerAmarinder Bindra <a-bindra@ti.com>
Fri, 21 Mar 2014 14:41:41 +0000 (20:11 +0530)
For single planar, the flush mechanism was returning the same buffer
again when the process call was called during flush.
Resetting the number of output buffers to 0 in addition to number of inBufs
resolves the issue. Libdce counts the number of address translations based
these counts.

Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
viddec3test.c

index 20fc252b2bf6f08004275c69914dc08f01b5e199..c7f3626a6bc3efa3440179844fc53ee0eb81305c 100644 (file)
@@ -353,6 +353,7 @@ decoder_process(struct decoder *decoder)
                        err = VIDDEC3_control(decoder->codec, XDM_FLUSH,
                                        decoder->dynParams, decoder->status);
                        inBufs->numBufs = 0;
+                       outBufs->numBufs = 0;
                        inArgs->inputID = 0;
                }
                break;
@@ -423,6 +424,7 @@ decoder_process(struct decoder *decoder)
                        }
                        else{
                                decoder->outBuf_fd[freeBufCount++] = buf->fd[0];
+                               DBG("FreeBufID: %p fd:%d\n", outArgs->freeBufID[i], buf->fd[0]);
                        }
                }