changeset 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 f14d50df103f
children 5a9485bd4421
files utils.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Feb 09 01:39:33 2009 +0000
+++ b/utils.c	Mon Feb 09 01:51:36 2009 +0000
@@ -501,6 +501,10 @@
                             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;