Revision | f1f0f7c02045bc76b1c7e92c566ec959aedec53a (tree) |
---|---|
Zeit | 2014-04-06 23:10:45 |
Autor | jakago <jakago777@gmai...> |
Commiter | jakago |
ffmpegの実行エラーの対応を修正
@@ -572,17 +572,14 @@ def capture_stream( target, kouza, hdate, file ) | ||
572 | 572 | command = command % [$ffmpeg, file, id3_title, id3_album, '20' + file[0..1], out_folder + out_file] |
573 | 573 | end |
574 | 574 | system( command + " > #{$null} 2>&1" ) |
575 | - if $?.to_i == 0x7f00 | |
576 | - jputs( "\nffmpegが実行できません。パスの通った実行可能な場所にffmpegを置いてください。" ) | |
577 | - exit | |
578 | - end | |
579 | - | |
580 | 575 | if $? == 0 |
581 | 576 | result = true |
582 | 577 | print( 'O' ) |
583 | 578 | else |
584 | 579 | print( 'X' ) |
585 | - File.unlink( out_folder + out_file ) | |
580 | + jputs( "\nffmpegの実行でエラーが起こりました。パスの通った実行可能な場所にHTTP Live Streaming(HLS)に対応したffmpegがあることを確認してください。" ) | |
581 | + File.unlink( out_folder + out_file ) rescue false | |
582 | + exit | |
586 | 583 | end |
587 | 584 | end |
588 | 585 |