mm-video-v4l2: vidc: move flush waiting logic to appropriate place

If a flush arrives while codec-config buffers are in the ETB queue,
both flush and ETB are sent to the video driver which can cause
corruption in output frames. Move flush waiting logic so that flush
is deferred until the headers are consumed

Change-Id: Id0647bfc749ac7e4af975530ac82210cc93023f2
CRs-Fixed: 703100
1 file changed