Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sub/dec_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct dec_sub {

struct mp_codec_params *codec;
double start, end;
char *lang;

double last_vo_pts;
struct sd *sd;
Expand Down Expand Up @@ -171,6 +172,7 @@ static struct sd *init_decoder(struct dec_sub *sub)
.order = sub->order,
.attachments = sub->attachments,
.codec = sub->codec,
.lang = sub->lang,
.preload_ok = true,
};

Expand Down Expand Up @@ -204,6 +206,7 @@ struct dec_sub *sub_create(struct mpv_global *global, struct track *track,
.shared_opts_cache = m_config_cache_alloc(sub, global, &mp_subtitle_shared_sub_opts),
.sh = track->stream,
.codec = track->stream->codec,
.lang = track->lang,
.attachments = talloc_steal(sub, attachments),
.play_dir = 1,
.order = order,
Expand Down
1 change: 1 addition & 0 deletions sub/sd.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct sd {

struct attachment_list *attachments;
struct mp_codec_params *codec;
const char *lang;

// Set to false as soon as the decoder discards old subtitle events.
// (only needed if sd_functions.accept_packets_in_advance == false)
Expand Down
2 changes: 1 addition & 1 deletion sub/sd_sbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static void decode(struct sd *sd, struct demux_packet *packet)
packet->buffer,
packet->len,
fmt,
NULL
sd->lang
);

// Since `demux_sbr` only ever sends us one packet,
Expand Down