1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-02 01:05:03 +02:00

xsubenc: only 1 rectangle is supported so dont allow 0 as it would crash.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-05-04 19:01:42 +02:00
parent d7c91c4cea
commit 9522a752bf

View File

@ -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