Fixed malloc bug. Changed dvr_switch_file_extension to return 1 on success, 0 on fail.