media: dvb: Fix demux output buffer overflow state for secure demux

Buffer overflow is handled by flushing the output buffer and
reporting the overflow event to the user, and all subsequent data
callbacks are discarded until user is notified on the overflow.
When buffer overflow is reported by the secure demux and output buffer
is flushed, next calls to secure demux processing report the buffer
as free for new data, but data callbacks are discarded due to being
in overflow state. This causes write pointers of secure demux to get
out of sync.
This patch separates the flushing of the buffer, and now this occurs
when user is notified on the overflow, so secure demux now discards
data during the overflow state.

Change-Id: I20a0bc33b3261fdd4fa6e1f9a543187c1612cebf
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
2 files changed