[FFmpeg-cvslog] flashsvenc: fix image sizes below 192x192
Michael Niedermayer
git at videolan.org
Sat May 12 12:11:29 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 12 12:03:23 2012 +0200| [40d8c89cb67da27e084060545c9fc2648cdbe17a] | committer: Michael Niedermayer
flashsvenc: fix image sizes below 192x192
Fixes half of Ticket1105
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40d8c89cb67da27e084060545c9fc2648cdbe17a
---
libavcodec/flashsv2enc.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index fd7f5c7..fbf0c9c 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -205,6 +205,11 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
s->block_width = (s->image_width / 12) & ~15;
s->block_height = (s->image_height / 12) & ~15;
+ if(!s->block_width)
+ s->block_width = 1;
+ if(!s->block_height)
+ s->block_height = 1;
+
s->rows = (s->image_height + s->block_height - 1) / s->block_height;
s->cols = (s->image_width + s->block_width - 1) / s->block_width;
More information about the ffmpeg-cvslog
mailing list