bugfix: test for m_codec==NULL