lavc: switch from ts_end to duration in ff_ass_add_rect.
Make possible a end-to-presentation duration.
This commit is contained in:
parent
e7cb161515
commit
d51e08bb89
5 changed files with 19 additions and 15 deletions
|
|
@ -175,8 +175,6 @@ static int jacosub_decode_frame(AVCodecContext *avctx,
|
|||
goto end;
|
||||
|
||||
if (*ptr) {
|
||||
int ts_start = avpkt->pts;
|
||||
int ts_end = avpkt->pts + avpkt->duration;
|
||||
AVBPrint buffer;
|
||||
char *dec_sub;
|
||||
|
||||
|
|
@ -188,7 +186,7 @@ static int jacosub_decode_frame(AVCodecContext *avctx,
|
|||
av_bprint_init(&buffer, JSS_MAX_LINESIZE, JSS_MAX_LINESIZE);
|
||||
jacosub_to_ass(avctx, &buffer, ptr);
|
||||
av_bprint_finalize(&buffer, &dec_sub);
|
||||
ff_ass_add_rect(sub, dec_sub, ts_start, ts_end, 0);
|
||||
ff_ass_add_rect(sub, dec_sub, avpkt->pts, avpkt->duration, 0);
|
||||
av_free(dec_sub);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue