Lines Matching defs:sub
1250 static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
1252 memset(sub, 0, sizeof(*sub));
1253 sub->pts = AV_NOPTS_VALUE;
2090 const AVSubtitle *sub)
2093 if (sub->start_display_time) {
2098 ret = avctx->codec->encode_sub(avctx, buf, buf_size, sub);
2609 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
2627 avcodec_get_subtitle_defaults(sub);
2653 sub->pts = av_rescale_q(avpkt->pts,
2655 ret = avctx->codec->decode(avctx, sub, got_sub_ptr, &pkt_recoded);
2657 !!*got_sub_ptr >= !!sub->num_rects);
2659 if (sub->num_rects && !sub->end_display_time && avpkt->duration &&
2662 sub->end_display_time = av_rescale_q(avpkt->duration,
2666 for (i = 0; i < sub->num_rects; i++) {
2667 if (sub->rects[i]->ass && !utf8_check(sub->rects[i]->ass)) {
2671 avsubtitle_free(sub);
2684 sub->format = 0;
2686 sub->format = 1;
2703 void avsubtitle_free(AVSubtitle *sub)
2707 for (i = 0; i < sub->num_rects; i++) {
2708 av_freep(&sub->rects[i]->pict.data[0]);
2709 av_freep(&sub->rects[i]->pict.data[1]);
2710 av_freep(&sub->rects[i]->pict.data[2]);
2711 av_freep(&sub->rects[i]->pict.data[3]);
2712 av_freep(&sub->rects[i]->text);
2713 av_freep(&sub->rects[i]->ass);
2714 av_freep(&sub->rects[i]);
2717 av_freep(&sub->rects);
2719 memset(sub, 0, sizeof(AVSubtitle));