summaryrefslogtreecommitdiff
path: root/libavcodec/zmbv.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2010-04-04 07:18:10 +0000
committerReinhard Tartler <siretart@tauware.de>2010-04-04 07:18:10 +0000
commit2819760b5c9db0eb4e7e09e36e9a32efd6b484fd (patch)
tree46359ff76094cb669ad13f2282e572752650f994 /libavcodec/zmbv.c
parent2bb962567e1c746680525e95e854cf186b7ca45a (diff)
Avoid division by zero
Based on clang-scan report http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/107290 Originally committed as revision 22795 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/zmbv.c')
-rw-r--r--libavcodec/zmbv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index e8e5135731..bfd6067cd3 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -434,6 +434,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
}
if(c->bw == 0 || c->bh == 0) {
av_log(avctx, AV_LOG_ERROR, "Unsupported block size %ix%i\n", c->bw, c->bh);
+ return -1;
}
if(c->comp != 0 && c->comp != 1) {
av_log(avctx, AV_LOG_ERROR, "Unsupported compression type %i\n", c->comp);