Prevent endless loop on decoder stream end