From 9522a752bf4179b69fa9e334ee755405ba8f4459 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 May 2011 19:01:42 +0200 Subject: [PATCH] xsubenc: only 1 rectangle is supported so dont allow 0 as it would crash. Signed-off-by: Michael Niedermayer --- libavcodec/xsubenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index c448a2271c..a7e3a891d4 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -129,7 +129,7 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, } // TODO: support multiple rects - if (h->num_rects > 1) + if (h->num_rects != 1) av_log(avctx, AV_LOG_WARNING, "Only single rects supported (%d in subtitle.)\n", h->num_rects); // TODO: render text-based subtitles into bitmaps