Skip to content

Commit

Permalink
feat: propagate upstream http code and log upstream URI in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienChauvin committed Jul 17, 2024
1 parent 88418b3 commit c6c5f26
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions vod/subtitle/webvtt_builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ webvtt_builder_build(
uint64_t start_time;
uint64_t base_time;
uint64_t segment_start_time = media_set->segment_start_time;
//uint64_t segment_end_time = media_set->segment_start_time + media_set->segment_duration;
uint32_t id_size;
size_t result_size;
u_char* end;
Expand Down Expand Up @@ -117,25 +116,25 @@ webvtt_builder_build(
last_frame = part->last_frame;
}

if (start_time >= segment_start_time) {
src = (u_char * )(uintptr_t)
cur_frame->offset;
if (start_time >= segment_start_time) {
src = (u_char * )(uintptr_t)
cur_frame->offset;

// cue identifier
id_size = cur_frame->key_frame;
p = vod_copy(p, src, id_size);
src += id_size;
// cue identifier
id_size = cur_frame->key_frame;
p = vod_copy(p, src, id_size);
src += id_size;

// cue timings
p = webvtt_builder_write_timestamp(p, start_time);
p = vod_copy(p, WEBVTT_TIMESTAMP_DELIM, sizeof(WEBVTT_TIMESTAMP_DELIM) - 1);
p = webvtt_builder_write_timestamp(p, start_time + cur_frame->pts_delay);
// cue timings
p = webvtt_builder_write_timestamp(p, start_time);
p = vod_copy(p, WEBVTT_TIMESTAMP_DELIM, sizeof(WEBVTT_TIMESTAMP_DELIM) - 1);
p = webvtt_builder_write_timestamp(p, start_time + cur_frame->pts_delay);

// cue settings list + cue payload
p = vod_copy(p, src, cur_frame->size - id_size);
}
// cue settings list + cue payload
p = vod_copy(p, src, cur_frame->size - id_size);
}

start_time += cur_frame->duration;
start_time += cur_frame->duration;
}
}

Expand Down

0 comments on commit c6c5f26

Please sign in to comment.