summaryrefslogtreecommitdiff
path: root/libavcodec/dvdsubenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-18 16:41:24 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-17 15:48:20 +0200
commit466b39efaf09adecc7314eaba5904b0ee8442528 (patch)
treeaeb8839317065d0df14454019d13f96ad77f1d92 /libavcodec/dvdsubenc.c
parent9f64c8219ada4bd48927abaa5eebd7ff9ba95f61 (diff)
lavc: replace AVCodecContext.encode with subtitle-specific callback
AVCodecContext.encode is currently used only for subtitles, encode2 is used for audio and video.
Diffstat (limited to 'libavcodec/dvdsubenc.c')
-rw-r--r--libavcodec/dvdsubenc.c6
1 files changed, 3 insertions, 3 deletions
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"),
};