From 671df54e4dcf0675c335483d26f7f6ff9baaf76a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 12 Jan 2016 23:48:19 +0100 Subject: demux: merge sh_video/sh_audio/sh_sub This is mainly a refactor. I'm hoping it will make some things easier in the future due to cleanly separating codec metadata and stream metadata. Also, declare that the "codec" field can not be NULL anymore. demux.c will set it to "" if it's NULL when added. This gets rid of a corner case everything had to handle, but which rarely happened. --- sub/sd_ass.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sub/sd_ass.c') diff --git a/sub/sd_ass.c b/sub/sd_ass.c index 658e952c28..2358ba45f6 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -165,12 +165,12 @@ static int init(struct sd *sd) struct sd_ass_priv *ctx = talloc_zero(sd, struct sd_ass_priv); sd->priv = ctx; - char *extradata = sd->sh->extradata; - int extradata_size = sd->sh->extradata_size; + char *extradata = sd->codec->extradata; + int extradata_size = sd->codec->extradata_size; - if (strcmp(sd->sh->codec, "ass") != 0) { + if (strcmp(sd->codec->codec, "ass") != 0) { ctx->is_converted = true; - ctx->converter = lavc_conv_create(sd->log, sd->sh->codec, extradata, + ctx->converter = lavc_conv_create(sd->log, sd->codec->codec, extradata, extradata_size); if (!ctx->converter) return -1; @@ -203,7 +203,7 @@ static int init(struct sd *sd) ass_set_check_readorder(ctx->ass_track, sd->opts->sub_clear_on_seek ? 0 : 1); #endif - ctx->frame_fps = sd->sh->sub->frame_based; + ctx->frame_fps = sd->codec->frame_based; update_subtitle_speed(sd); enable_output(sd, true); -- cgit v1.2.3