From 687b552db186af66e97c58792b2db40294e92bad Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 18 Dec 2015 01:54:14 +0100 Subject: sub: remove subtitle filter chain concept It was stupid. The only thing that still effectively used it was sd_lavc_conv - all other "filters" were the subtitle decoder/renderers for text (sd_ass) and bitmap (sd_lavc) subtitles. While having a subtitle filter chain was interesting (and actually worked in almost the same way as the audio/video ones), I didn't manage to use it in a meaningful way, and I couldn't e.g. factor secondary features like fixing subtitle timing into filters. Refactor the shit and drop unneeded things as it goes. --- sub/sd_lavc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sub/sd_lavc.c') diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 563ac554fc..08fff28d8a 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -28,6 +28,7 @@ #include "talloc.h" #include "common/msg.h" #include "common/av_common.h" +#include "demux/stheader.h" #include "options/options.h" #include "video/mp_image.h" #include "sd.h" @@ -110,7 +111,7 @@ static void get_resolution(struct sd *sd, int wh[2]) static int init(struct sd *sd) { struct sd_lavc_priv *priv = talloc_zero(NULL, struct sd_lavc_priv); - enum AVCodecID cid = mp_codec_to_av_codec_id(sd->codec); + enum AVCodecID cid = mp_codec_to_av_codec_id(sd->sh->codec); AVCodecContext *ctx = NULL; AVCodec *sub_codec = avcodec_find_decoder(cid); if (!sub_codec) @@ -118,7 +119,7 @@ static int init(struct sd *sd) ctx = avcodec_alloc_context3(sub_codec); if (!ctx) goto error; - mp_lavc_set_extradata(ctx, sd->extradata, sd->extradata_len); + mp_lavc_set_extradata(ctx, sd->sh->extradata, sd->sh->extradata_size); if (avcodec_open2(ctx, sub_codec, NULL) < 0) goto error; priv->avctx = ctx; -- cgit v1.2.3