You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/ccaptions_dec: correct flushing output on EOF
Prevents infinite flushing same last output.
This commit is contained in:
@@ -900,6 +900,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub,
|
|||||||
ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated);
|
ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
av_bprint_clear(&ctx->buffer[bidx]);
|
||||||
sub->pts = ctx->buffer_time[1];
|
sub->pts = ctx->buffer_time[1];
|
||||||
sub->end_display_time = av_rescale_q(ctx->buffer_time[1] - ctx->buffer_time[0],
|
sub->end_display_time = av_rescale_q(ctx->buffer_time[1] - ctx->buffer_time[0],
|
||||||
AV_TIME_BASE_Q, ms_tb);
|
AV_TIME_BASE_Q, ms_tb);
|
||||||
|
Reference in New Issue
Block a user