From 1058d80a5ecafeb4eebcc558be548ac6877955ef Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Jun 2013 22:09:04 +0200 Subject: sd_ass: handle libavformat ASS comment packets as well Currently, we are filtering libavformat style ASS packets by checking whether they are prefixed "Dialogue: ". Unfortunately, comment packets are demuxed too. These start with "Comment: ", so they are not caught. Change the filtering, and use the codec ID instead. libavformat uses "ssa" as codec ID for ASS subtitles, while mpv uses "ass". Also, at least FFmpeg will change the ASS packet format to the same format mpv and Matroska use, and identify these with "ass" as codec ID, so this is works out nicely. --- sub/sd_lavc_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/sd_lavc_conv.c') diff --git a/sub/sd_lavc_conv.c b/sub/sd_lavc_conv.c index 1fc0262f96..4f24e20709 100644 --- a/sub/sd_lavc_conv.c +++ b/sub/sd_lavc_conv.c @@ -87,7 +87,7 @@ static int init(struct sd *sd) avctx->time_base = (AVRational) {1, 1000}; priv->avctx = avctx; sd->priv = priv; - sd->output_codec = "ass"; + sd->output_codec = "ssa"; sd->output_extradata = avctx->subtitle_header; sd->output_extradata_len = avctx->subtitle_header_size; if (sd->output_extradata) { -- cgit v1.2.3