AVBPrint new_line;
char *line = avpkt->data;
char *end = avpkt->data + avpkt->size;
+ FFASSDecoderContext *s = avctx->priv_data;
struct microdvd_tag tags[sizeof(MICRODVD_TAGS) - 1] = {{0}};
if (avpkt->size <= 0)
}
}
if (new_line.len) {
- int ret;
- int64_t start = avpkt->pts;
- int64_t duration = avpkt->duration;
- int ts_start = av_rescale_q(start, avctx->time_base, (AVRational){1,100});
- int ts_duration = duration != -1 ?
- av_rescale_q(duration, avctx->time_base, (AVRational){1,100}) : -1;
-
- ret = ff_ass_add_rect_bprint(sub, &new_line, ts_start, ts_duration);
+ int ret = ff_ass_add_rect(sub, new_line.str, s->readorder++, 0, NULL, NULL);
av_bprint_finalize(&new_line, NULL);
if (ret < 0)
return ret;
.id = AV_CODEC_ID_MICRODVD,
.init = microdvd_init,
.decode = microdvd_decode_frame,
+ .flush = ff_ass_decoder_flush,
+ .priv_data_size = sizeof(FFASSDecoderContext),
};