[FFmpeg-cvslog] r17093 - trunk/libavcodec/utils.c

superdump subversion
Mon Feb 9 02:58:02 CET 2009


Author: superdump
Date: Mon Feb  9 02:58:01 2009
New Revision: 17093

Log:
Check that there are subtitle rects to encode in avcodec_encode_subtitle()

Patch by Bj?rn Axelsson ( gecko A acc D umu D se )

Modified:
   trunk/libavcodec/utils.c

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Mon Feb  9 02:51:36 2009	(r17092)
+++ trunk/libavcodec/utils.c	Mon Feb  9 02:58:01 2009	(r17093)
@@ -505,6 +505,8 @@ int avcodec_encode_subtitle(AVCodecConte
         av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
         return -1;
     }
+    if(sub->num_rects == 0 || !sub->rects)
+        return -1;
     ret = avctx->codec->encode(avctx, buf, buf_size, sub);
     avctx->frame_number++;
     return ret;




More information about the ffmpeg-cvslog mailing list