ffmpeg:avcodec_encode_subtitle
Table of Contents
avcodec_encode_subtitle
Overview
Defined in avcodec.h
Encodes a subtitle frame from sub
into buf
.
The avcodec_encode_subtitle() function encodes a video frame from the input sub
. To encode it, it makes use of the video codec which was coupled with avctx
using avcodec_open(). The resulting encoded bytes representing the frame are stored in the output buffer buf
.
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub);
Parameters
avctx
AVCodecContext *avctx
The AVCodecContext codec context.
buf
uint8_t *buf
The output buffer for the bitstream of encoded frame.
buf_size
int buf_size
The size of the output buffer in bytes.
sub
const AVSubtitle *sub
The input AVSubtitle subtitle to encode.
Return value
On error a negative value is returned, on success zero or the number of bytes used from the input buffer.
See also
ffmpeg/avcodec_encode_subtitle.txt · Last modified: 2007/12/14 14:46 by deva