Lines Matching refs:sub
158 * @param sub pointer to the processed subtitle data
497 static int display_end_segment(AVCodecContext *avctx, AVSubtitle *sub,
505 pts = ctx->presentation.pts != AV_NOPTS_VALUE ? ctx->presentation.pts : sub->pts;
506 memset(sub, 0, sizeof(*sub));
507 sub->pts = pts;
509 sub->start_display_time = 0;
511 // is defined by the start of the next sub which may contain no
512 // objects (i.e. clears the previous sub)
513 sub->end_display_time = UINT32_MAX;
514 sub->format = 0;
519 sub->rects = av_calloc(ctx->presentation.object_count, sizeof(*sub->rects));
520 if (!sub->rects) {
528 avsubtitle_free(sub);
537 sub->rects[sub->num_rects++] = rect;
592 static int decode(AVCodecContext *avctx, AVSubtitle *sub,
603 ff_dlog(avctx, "PGS sub packet:\n");
641 ret = parse_presentation_segment(avctx, buf, segment_length, sub->pts);
659 ret = display_end_segment(avctx, sub, buf, segment_length);