MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / avcodec_encode_subtitle

Function avcodec_encode_subtitle

libavcodec/utils.c:570–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
571 const AVSubtitle *sub)
572{
573 int ret;
574 if(sub->start_display_time) {
575 av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
576 return -1;
577 }
578 if(sub->num_rects == 0 || !sub->rects)
579 return -1;
580 ret = avctx->codec->encode(avctx, buf, buf_size, sub);
581 avctx->frame_number++;
582 return ret;
583}
584
585#if LIBAVCODEC_VERSION_MAJOR < 53
586int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,

Callers 1

do_subtitle_outFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected