Try stopping muxer when codec is finished