From 466b39efaf09adecc7314eaba5904b0ee8442528 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 18 Aug 2012 16:41:24 +0200 Subject: lavc: replace AVCodecContext.encode with subtitle-specific callback AVCodecContext.encode is currently used only for subtitles, encode2 is used for audio and video. --- libavcodec/dvdsubenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/dvdsubenc.c') diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index c41a98394d..5e362b7f64 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -205,10 +205,10 @@ static int encode_dvd_subtitles(uint8_t *outbuf, int outbuf_size, } static int dvdsub_encode(AVCodecContext *avctx, - unsigned char *buf, int buf_size, void *data) + unsigned char *buf, int buf_size, + const AVSubtitle *sub) { //DVDSubtitleContext *s = avctx->priv_data; - AVSubtitle *sub = data; int ret; ret = encode_dvd_subtitles(buf, buf_size, sub); @@ -219,6 +219,6 @@ AVCodec ff_dvdsub_encoder = { .name = "dvdsub", .type = AVMEDIA_TYPE_SUBTITLE, .id = AV_CODEC_ID_DVD_SUBTITLE, - .encode = dvdsub_encode, + .encode_sub = dvdsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), }; -- cgit v1.2.3