[FFmpeg-cvslog] xsubenc: only 1 rectangle is supported so dont allow 0 as it would crash.
Michael Niedermayer
git at videolan.org
Wed May 4 23:36:20 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 4 19:01:42 2011 +0200| [9522a752bf4179b69fa9e334ee755405ba8f4459] | committer: Michael Niedermayer
xsubenc: only 1 rectangle is supported so dont allow 0 as it would crash.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9522a752bf4179b69fa9e334ee755405ba8f4459
---
libavcodec/xsubenc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c
index c448a22..a7e3a89 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
More information about the ffmpeg-cvslog
mailing list