diff options
Diffstat (limited to 'libavcodec/xsubenc.c')
-rw-r--r-- | libavcodec/xsubenc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index 210a9bfa75..cb2a908cad 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -111,9 +111,8 @@ static int make_tc(uint64_t ms, int *tc) } static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, - int bufsize, void *data) + int bufsize, const AVSubtitle *h) { - AVSubtitle *h = data; uint64_t startTime = h->pts / 1000; // FIXME: need better solution... uint64_t endTime = startTime + h->end_display_time - h->start_display_time; int start_tc[4], end_tc[4]; @@ -211,10 +210,10 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) } AVCodec ff_xsub_encoder = { - .name = "xsub", - .type = AVMEDIA_TYPE_SUBTITLE, - .id = AV_CODEC_ID_XSUB, - .init = xsub_encoder_init, - .encode = xsub_encode, - .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), + .name = "xsub", + .type = AVMEDIA_TYPE_SUBTITLE, + .id = AV_CODEC_ID_XSUB, + .init = xsub_encoder_init, + .encode_sub = xsub_encode, + .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), }; |