mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2025-01-30 13:54:39 +00:00
Rebasing
This commit is contained in:
parent
c0a40529a9
commit
7feb705d73
@ -621,7 +621,6 @@ void parse_segment_track_entry(struct matroska_ctx* mkv_ctx) {
|
||||
for (int i = 0; i < mkv_ctx->sub_tracks_count; i++)
|
||||
if (strcmp((const char *)mkv_ctx->sub_tracks[i]->lang, (const char *)lang) == 0)
|
||||
sub_track->lang_index++;
|
||||
|
||||
mkv_ctx->sub_tracks[mkv_ctx->sub_tracks_count] = sub_track;
|
||||
mkv_ctx->sub_tracks_count++;
|
||||
}
|
||||
@ -644,6 +643,8 @@ void parse_segment_tracks(struct matroska_ctx* mkv_ctx)
|
||||
switch (code) {
|
||||
/* Tracks ids*/
|
||||
case MATROSKA_SEGMENT_TRACK_ENTRY:
|
||||
|
||||
|
||||
parse_segment_track_entry(mkv_ctx);
|
||||
MATROSKA_SWITCH_BREAK(code, code_len);
|
||||
|
||||
@ -779,7 +780,6 @@ void save_sub_track(struct matroska_ctx* mkv_ctx, struct matroska_sub_track* tra
|
||||
{
|
||||
char number[9];
|
||||
sprintf(number, "%d", i + 1);
|
||||
|
||||
char *timestamp_start = malloc(sizeof(char) * 80); //being generous
|
||||
timestamp_to_srttime(sentence->time_start, timestamp_start);
|
||||
ULLONG time_end = sentence->time_end;
|
||||
@ -921,6 +921,7 @@ int matroska_loop(struct lib_ccx_ctx *ctx)
|
||||
mkv_ctx->current_second = 0;
|
||||
mkv_ctx->filename = ctx->inputfile[ctx->current_file];
|
||||
mkv_ctx->file = create_file(ctx);
|
||||
mkv_ctx->sub_tracks = malloc(MATROSKA_MAX_TRACKS*sizeof(struct matroska_sub_track*));
|
||||
|
||||
matroska_parse(mkv_ctx);
|
||||
|
||||
|
@ -207,7 +207,7 @@ struct matroska_sub_track {
|
||||
};
|
||||
|
||||
struct matroska_ctx {
|
||||
struct matroska_sub_track* sub_tracks[MATROSKA_MAX_TRACKS];
|
||||
struct matroska_sub_track** sub_tracks;
|
||||
struct lib_ccx_ctx* ctx;
|
||||
int sub_tracks_count;
|
||||
int sentence_count;
|
||||
|
Loading…
Reference in New Issue
Block a user