X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fccaption_dec.c;h=790f0718fd1a988401e10bb71f42ad14da1a7575;hb=16af350ac5b19ee464121a0545f100f6c0063296;hp=330ea6ac59bf9c40921e5355106f31c58f04e4d5;hpb=e816fe7401c900146d5230855a676f689136b884;p=ffmpeg diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index 330ea6ac59b..790f0718fd1 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -625,13 +625,14 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp if (ctx->real_time && ctx->screen_touched && avpkt->pts > ctx->last_real_time + av_rescale_q(20, ass_tb, avctx->time_base)) { + int start_time; ctx->last_real_time = avpkt->pts; ctx->screen_touched = 0; capture_screen(ctx); ctx->buffer_changed = 0; - int start_time = av_rescale_q(avpkt->pts, avctx->time_base, ass_tb); + start_time = av_rescale_q(avpkt->pts, avctx->time_base, ass_tb); ret = ff_ass_add_rect_bprint(sub, &ctx->buffer, start_time, -1); if (ret < 0) return ret;