Fix the crash when first open a YUV file then open a stream file