diff options
Diffstat (limited to 'sub')
-rw-r--r-- | sub/dec_sub.c | 4 | ||||
-rw-r--r-- | sub/sd.h | 3 | ||||
-rw-r--r-- | sub/sd_ass.c | 13 |
3 files changed, 5 insertions, 15 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 0a62e52a15..79aaeba888 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -209,7 +209,6 @@ void sub_init_from_sh(struct dec_sub *sub, struct sh_stream *sh) sub_set_extradata(sub, sh->sub->extradata, sh->sub->extradata_len); struct sd init_sd = sub->init_sd; init_sd.codec = sh->codec; - init_sd.ass_track = sh->sub->track; init_sd.sub_stream_w = sh->sub->w; init_sd.sub_stream_h = sh->sub->h; @@ -416,8 +415,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh) pthread_mutex_lock(&sub->lock); - if (!sub_accept_packets_in_advance(sub) || sh->sub->track || sub->num_sd < 1) - { + if (!sub_accept_packets_in_advance(sub) || sub->num_sd < 1) { pthread_mutex_unlock(&sub->lock); return false; } @@ -28,9 +28,6 @@ struct sd { // Resolution hints stored in mp4 files. int sub_stream_w, sub_stream_h; - // Make sd_ass use an existing track - struct ass_track *ass_track; - // Shared renderer for ASS - done to avoid reloading embedded fonts. struct ass_library *ass_library; struct ass_renderer *ass_renderer; diff --git a/sub/sd_ass.c b/sub/sd_ass.c index e4428516b9..4ae7121bad 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -68,13 +68,9 @@ static int init(struct sd *sd) ctx->is_converted = sd->converted_from != NULL; - if (sd->ass_track) { - ctx->ass_track = sd->ass_track; - } else { - ctx->ass_track = ass_new_track(sd->ass_library); - if (!ctx->is_converted) - ctx->ass_track->track_type = TRACK_TYPE_ASS; - } + ctx->ass_track = ass_new_track(sd->ass_library); + if (!ctx->is_converted) + ctx->ass_track->track_type = TRACK_TYPE_ASS; if (sd->extradata) { ass_process_codec_private(ctx->ass_track, sd->extradata, @@ -310,8 +306,7 @@ static void uninit(struct sd *sd) { struct sd_ass_priv *ctx = sd->priv; - if (sd->ass_track != ctx->ass_track) - ass_free_track(ctx->ass_track); + ass_free_track(ctx->ass_track); talloc_free(ctx); } |