Ticket #6774: h264.2.diff

File h264.2.diff, 1.6 KB (added by disafan@…, 3 years ago)

Update H264 Patch to correct defined issue

  • bindings/perl/MythTV/Recording.pm

     
    309309    # Grab the info we want from mplayer (go uber-verbose to override --really-quiet) 
    310310        my $data = `$program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 1 -identify '$file' 2>/dev/null`; 
    311311        study $data; 
    312         ($info{'video_type'})            = $data =~ m/^VIDEO:\s*(MPEG[12])/m; 
     312        ($info{'video_type'})            = $data =~ m/^VIDEO:?\s*(MPEG[12]|H264)/m; 
    313313        ($info{'width'})                 = $data =~ m/^ID_VIDEO_WIDTH=0*([1-9]\d*)/m; 
    314314        ($info{'height'})                = $data =~ m/^ID_VIDEO_HEIGHT=0*([1-9]\d*)/m; 
    315315        ($info{'fps'})                   = $data =~ m/^ID_VIDEO_FPS=0*([1-9]\d*(?:\.\d+)?)/m; 
     
    321321        ($info{'aspect'})                = $data =~ m/^ID_VIDEO_ASPECT=0*([1-9]\d*(?:[\.\,]\d+)?)/m; 
    322322        ($info{'audio_type'})            = $data =~ m/^ID_AUDIO_CODEC=0*([1-9]\d*(?:\.\d+)?)/m; 
    323323        ($info{'mpeg_stream_type'})      = $data =~ m/^ID_DEMUXER=(\w+)/mi; 
     324        if (!defined($info{'width'}))  
     325            { 
     326               my $altdata = `$program -v -v -v -v -nolirc -nojoystick -vo null -ao null -frames 1 -identify -demuxer lavf '$file' 2>/dev/null`; 
     327               study $altdata; 
     328               ($info{'width'}) = $altdata =~ m/^ID_VIDEO_WIDTH=0*([1-9]\d*)/m; 
     329             ($info{'height'})  = $altdata =~ m/^ID_VIDEO_HEIGHT=0*([1-9]\d*)/m; 
     330            }  
     331 
    324332    # Stream type 
    325333        $info{'mpeg_stream_type'} = lc($info{'mpeg_stream_type'}); 
    326334        if ($info{'mpeg_stream_type'} && $info{'mpeg_stream_type'} !~ /^mpeg/) {