This patchset fixes handling the draining use case (tested on db410c) and simplifies the overall design making it easier to analyze and maintain. All encoders/decoders have been tested on db410c and db820c (Qualcomm's 96Boards) on their latest software releases.