Mercurial > libavcodec.hg
comparison utils.c @ 8771:f7442819cacf libavcodec
Check that start_display_time is 0 in avcodec_encode_subtitle()
Patch by Bj«Órn Axelsson ( gecko A acc D umu D se )
author | superdump |
---|---|
date | Mon, 09 Feb 2009 01:51:36 +0000 |
parents | d529e239a510 |
children | 5a9485bd4421 |
comparison
equal
deleted
inserted
replaced
8770:f14d50df103f | 8771:f7442819cacf |
---|---|
499 | 499 |
500 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, | 500 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, |
501 const AVSubtitle *sub) | 501 const AVSubtitle *sub) |
502 { | 502 { |
503 int ret; | 503 int ret; |
504 if(sub->start_display_time) { | |
505 av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n"); | |
506 return -1; | |
507 } | |
504 ret = avctx->codec->encode(avctx, buf, buf_size, sub); | 508 ret = avctx->codec->encode(avctx, buf, buf_size, sub); |
505 avctx->frame_number++; | 509 avctx->frame_number++; |
506 return ret; | 510 return ret; |
507 } | 511 } |
508 | 512 |