muxer: Fix crashes at the end of muxing.
muxer: Fix crashes at the end of muxing.

mstorsjo/l-smash,l-smash/l-smash,silverfilain/L-SMASH,dwbuiten/l-smash,canbal/l-smash,l-smash/l-smash,l-smash/l-smash,canbal/l-smash,silverfilain/L-SMASH,maki-rxrz/L-SMASH,dwbuiten/l-smash,maki-rxrz/L-SMASH,silverfilain/L-SMASH,mstorsjo/l-smash