Revert "Remove decoding thread like in Java common"

This reverts commit 50733f6d7af941fb0771b1e4ad77b85183261715.
Fix packet size allocation for video stream