Add padding to the end of stream.
Merge branch 'develop' into ffmpeg
Fix encoder for new API.