fixed bug: codec not updating in stream