summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sub/dec_sub.c1
-rw-r--r--sub/sd.h4
-rw-r--r--sub/sd_ass.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 7e4427a40f..4eb0dfa99f 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -224,6 +224,7 @@ void sub_init_from_sh(struct dec_sub *sub, struct sh_sub *sh)
}
init_sd = (struct sd) {
.codec = sd->output_codec,
+ .converted_from = sd->codec,
.extradata = sd->output_extradata,
.extradata_len = sd->output_extradata_len,
.ass_library = sub->init_sd.ass_library,
diff --git a/sub/sd.h b/sub/sd.h
index fc1085f8ed..a2f57a5808 100644
--- a/sub/sd.h
+++ b/sub/sd.h
@@ -16,6 +16,10 @@ struct sd {
char *extradata;
int extradata_len;
+ // Set to !=NULL if the input packets are being converted from another
+ // format.
+ const char *converted_from;
+
// Video resolution used for subtitle decoding. Doesn't necessarily match
// the resolution of the VO, nor does it have to be the OSD resolution.
int sub_video_w, sub_video_h;
diff --git a/sub/sd_ass.c b/sub/sd_ass.c
index 7e863a2844..1f7f33b026 100644
--- a/sub/sd_ass.c
+++ b/sub/sd_ass.c
@@ -67,6 +67,7 @@ static int init(struct sd *sd)
return -1;
bool ass = is_native_ass(sd->codec);
+ bool is_converted = sd->converted_from != NULL;
struct sd_ass_priv *ctx = talloc_zero(NULL, struct sd_ass_priv);
sd->priv = ctx;
if (sd->ass_track) {
@@ -81,7 +82,7 @@ static int init(struct sd *sd)
sd->extradata_len);
}
- ctx->vsfilter_aspect = ass;
+ ctx->vsfilter_aspect = !is_converted;
return 0;
}