Ticket #8349: stream_flv.pl.diff

File stream_flv.pl.diff, 953 bytes (added by brandon.d.shields+mythtv@…, 14 years ago)
  • (a) /dev/stdin vs. (b) stream_flv.pl

    a b  
    22#
    33# MythWeb Streaming/Download module
    44#
    5 # @url       $URL$
    6 # @date      $Date$
    7 # @version   $Revision$
    8 # @author    $Author$
     5# @url       $URL: http://svn.mythtv.org/svn/branches/release-0-23-fixes/mythplugins/mythweb/modules/stream/stream_flv.pl $
     6# @date      $Date: 2009-10-29 17:58:53 -0700 (Thu, 29 Oct 2009) $
     7# @version   $Revision: 22646 $
     8# @author    $Author: kormoc $
    99#
    1010
    1111    use Math::Round qw(round_even);
    1212
    1313    our $ffmpeg_pid;
    14 
     14    our $ffmpeg_pgid;
    1515# Shutdown cleanup, of various types
     16    $ffmpeg_pgid = setpgrp(0,0);
    1617    $SIG{'TERM'} = \&shutdown_handler;
    1718    $SIG{'PIPE'} = \&shutdown_handler;
    1819    END {
    1920        shutdown_handler();
    2021    }
    2122    sub shutdown_handler {
    22         kill(1, $ffmpeg_pid) if ($ffmpeg_pid);
     23        kill(-1, $ffmpeg_pgid) if ($ffmpeg_pid);
    2324    }
    2425
    2526# Find ffmpeg