Ticket #6304: handbrake_subrip.patch

File handbrake_subrip.patch, 1.5 KB (added by Carl Eugen Hoyos, 9 years ago)
  • libhb/stream.c

    From 8066b69b14735e94432316055d8546572ae65c9e Mon Sep 17 00:00:00 2001
    From: Sven Gothel <sgothel@jausoft.com>
    Date: Thu, 28 Dec 2017 04:28:26 +0100
    Subject: [PATCH] Using AV_CODEC_ID_SUBRIP instead of AV_CODEC_ID_SRT
     (libav->ffmpeg)
    
    This fixes issue https://trac.ffmpeg.org/ticket/6304
    See https://github.com/HandBrake/HandBrake/pull/981#issuecomment-347364763
    See https://github.com/HandBrake/HandBrake/issues/974#issuecomment-353986772
    ---
     libhb/stream.c | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/libhb/stream.c b/libhb/stream.c
    index e223482cd..34670160b 100644
    a b static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t *stream, int id  
    53095309                        "subtitle colors likely to be wrong" );
    53105310            break;
    53115311        case AV_CODEC_ID_TEXT:
    5312         case AV_CODEC_ID_SRT:
     5312        case AV_CODEC_ID_SUBRIP:
    53135313            subtitle->format = TEXTSUB;
    53145314            subtitle->source = UTF8SUB;
    53155315            subtitle->config.dest = PASSTHRUSUB;
    hb_buffer_t * hb_ffmpeg_read( hb_stream_t *stream )  
    58825882            break;
    58835883    }
    58845884    if ( ffmpeg_pkt_codec == AV_CODEC_ID_TEXT ||
    5885          ffmpeg_pkt_codec == AV_CODEC_ID_SRT  ||
     5885         ffmpeg_pkt_codec == AV_CODEC_ID_SUBRIP  ||
    58865886         ffmpeg_pkt_codec == AV_CODEC_ID_MOV_TEXT ) {
    58875887        int64_t ffmpeg_pkt_duration = stream->ffmpeg_pkt.duration;
    58885888        int64_t buf_duration = av_to_hb_pts( ffmpeg_pkt_duration, tsconv, 0 );