Playback finally working. Was not returning number of consumed frames in playback. Might have memory leak, verify that.