Fix missing var, check if record have opened file
Fix missing var, check if record have opened file

sergey-dryabzhinsky/nginx-rtmp-module,UweM/nginx-rtmp-module,sergey-dryabzhinsky/nginx-rtmp-module,sergey-dryabzhinsky/nginx-rtmp-module,UweM/nginx-rtmp-module,UweM/nginx-rtmp-module