diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-08-18 16:41:24 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-17 15:48:20 +0200 |
commit | 466b39efaf09adecc7314eaba5904b0ee8442528 (patch) | |
tree | aeb8839317065d0df14454019d13f96ad77f1d92 /libavcodec/dvbsub.c | |
parent | 9f64c8219ada4bd48927abaa5eebd7ff9ba95f61 (diff) | |
download | ffmpeg-466b39efaf09adecc7314eaba5904b0ee8442528.tar.gz |
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/dvbsub.c')
-rw-r--r-- | libavcodec/dvbsub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c index 51317f0a87..26d14bd363 100644 --- a/libavcodec/dvbsub.c +++ b/libavcodec/dvbsub.c @@ -195,7 +195,7 @@ static void dvb_encode_rle4(uint8_t **pq, } static int encode_dvb_subtitles(DVBSubtitleContext *s, - uint8_t *outbuf, AVSubtitle *h) + uint8_t *outbuf, const AVSubtitle *h) { uint8_t *q, *pseg_len; int page_id, region_id, clut_id, object_id, i, bpp_index, page_state; @@ -392,10 +392,10 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s, } static int dvbsub_encode(AVCodecContext *avctx, - unsigned char *buf, int buf_size, void *data) + unsigned char *buf, int buf_size, + const AVSubtitle *sub) { DVBSubtitleContext *s = avctx->priv_data; - AVSubtitle *sub = data; int ret; ret = encode_dvb_subtitles(s, buf, sub); @@ -407,6 +407,6 @@ AVCodec ff_dvbsub_encoder = { .type = AVMEDIA_TYPE_SUBTITLE, .id = AV_CODEC_ID_DVB_SUBTITLE, .priv_data_size = sizeof(DVBSubtitleContext), - .encode = dvbsub_encode, + .encode_sub = dvbsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), }; |