Check that start_display_time is 0 in avcodec_encode_subtitle()
Patch by Björn Axelsson ( gecko A acc D umu D se ) Originally committed as revision 17092 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
committed by
Robert Swain
parent
d84d6fbf28
commit
9413db9e04
@ -501,6 +501,10 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
|||||||
const AVSubtitle *sub)
|
const AVSubtitle *sub)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
if(sub->start_display_time) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
ret = avctx->codec->encode(avctx, buf, buf_size, sub);
|
ret = avctx->codec->encode(avctx, buf, buf_size, sub);
|
||||||
avctx->frame_number++;
|
avctx->frame_number++;
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user