aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorBjörn Axelsson <gecko@acc.umu.se>2009-02-09 01:51:36 +0000
committerRobert Swain <robert.swain@gmail.com>2009-02-09 01:51:36 +0000
commit9413db9e04178393612f86561b70550b2c47545d (patch)
treed44e73195cce7bb3c9fcb93d036d27353bd7fe70 /libavcodec/utils.c
parentd84d6fbf28e4d655611872cae0e142a8f2d06c10 (diff)
downloadffmpeg-9413db9e04178393612f86561b70550b2c47545d.tar.gz
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
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 000a6e798e..a1383a3d17 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -501,6 +501,10 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
const AVSubtitle *sub)
{
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);
avctx->frame_number++;
return ret;