mm-video: vidc: Fix codec config behavior in flush

- Sends any pending codec config data to the driver when
  an OMX_CommandFlush is received
- Flushes all data when the input port is disabled
- Resets source/dest frames to NULL once all input buffers are freed
- Checks the codec config flag after checking for a null buffer

On ETB, buffers are added to an ETB queue and later pushed to driver
by ETBProxy. If a flush command arrives, it preempts any ETBs and
returns the buffers to the client. In the case of codec config
buffers, clients are not prepared to receive these buffers and they
get lost (never pushed to driver). This results in perceived
bitstream corruption.

Change-Id: I6a250d61da8e3f03b1dd725cde403838f3bc98db
2 files changed