bugfix: test for m_codec==NULL

If m_bitstream->Open fails, Open fails without m_codec and m_format being set. As a result the lines below the test will make xbmc core dump.