command: add sub-ass-extradata property

This commit is contained in:
llyyr
2023-08-26 18:47:01 +05:30
committed by Dudemanguy
parent 902bbdad35
commit f9918b5390
4 changed files with 39 additions and 0 deletions

View File

@@ -369,6 +369,15 @@ char *sub_get_text(struct dec_sub *sub, double pts, enum sd_text_type type)
return text;
}
char *sub_ass_get_extradata(struct dec_sub *sub)
{
if (strcmp(sub->sd->codec->codec, "ass") != 0)
return NULL;
char *extradata = sub->sd->codec->extradata;
int extradata_size = sub->sd->codec->extradata_size;
return talloc_strndup(NULL, extradata, extradata_size);
}
struct sd_times sub_get_times(struct dec_sub *sub, double pts)
{
pthread_mutex_lock(&sub->lock);