summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-18 01:54:14 +0100
committerwm4 <wm4@nowhere>2015-12-18 03:52:57 +0100
commit687b552db186af66e97c58792b2db40294e92bad (patch)
tree07606c9faad58efa28c2e91961d01f2856600ab9 /sub/sd_lavc.c
parent2c7db48195b03e93ee3cbf382ccabcedb96a6830 (diff)
downloadmpv-687b552db186af66e97c58792b2db40294e92bad.tar.bz2
mpv-687b552db186af66e97c58792b2db40294e92bad.tar.xz
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.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c5
1 files changed, 3 insertions, 2 deletions
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;