mssdemux: add conditions to prevent some crashes