reset optind counter, so rtmpdump can be launched multiple times from JNI; nulled file pointer after success for same reason