From 4a3f0ee85d80bf27bf2ff2cbb9e354ab95cc2b77 Mon Sep 17 00:00:00 2001 From: Pranav Rajpal <78008260+pranavrajpal@users.noreply.github.com> Date: Mon, 19 Apr 2021 21:56:47 -0700 Subject: [PATCH] Remove WebVTT handling code in gf_isom_dump_srt_track Remove the code that handles WebVTT in gf_isom_dump_srt_track to avoid needing to pull in a lot of other files from GPAC. gf_isom_dump_srt_track doesn't appear to be used by ccextractor directly or indirectly (it's only called in gf_isom_text_dump which doesn't appear to be called anywhere else) so it should be fine removing it. --- src/thirdparty/gpacmp4/box_dump.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/thirdparty/gpacmp4/box_dump.c b/src/thirdparty/gpacmp4/box_dump.c index b6f253a1..699a908f 100644 --- a/src/thirdparty/gpacmp4/box_dump.c +++ b/src/thirdparty/gpacmp4/box_dump.c @@ -3191,32 +3191,6 @@ static GF_Err gf_isom_dump_srt_track(GF_ISOFile *the_file, u32 track, FILE *dump gf_fprintf(dump, "%s\n", szDur); if (subtype == GF_ISOM_SUBTYPE_WVTT) { - u64 start_ts; - void webvtt_write_cue(GF_BitStream *bs, GF_WebVTTCue *cue); - GF_List *cues; - u8 *data; - u32 data_len; - bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE); - - start_ts = s->DTS * 1000; - start_ts /= trak->Media->mediaHeader->timeScale; - cues = gf_webvtt_parse_cues_from_data(s->data, s->dataLength, start_ts); - for (j = 0; j < gf_list_count(cues); j++) { - GF_WebVTTCue *cue = (GF_WebVTTCue *)gf_list_get(cues, j); - webvtt_write_cue(bs, cue); - gf_webvtt_cue_del(cue); - } - gf_list_del(cues); - gf_bs_write_u16(bs, 0); - gf_bs_get_content(bs, &data, &data_len); - gf_bs_del(bs); - - if (data) { - gf_fprintf(dump, "%s\n", data); - gf_free(data); - } else { - gf_fprintf(dump, "\n"); - } continue; } else if (subtype == GF_ISOM_SUBTYPE_STXT) { if (s->dataLength)