aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-10-31 18:01:10 +0000
committerPaul B Mahol <onemda@gmail.com>2012-10-31 19:42:07 +0000
commit010f1ce95443a539d3d0405b0b089f245121333a (patch)
tree2c03bbd7709177d69baaddf2b153dd233d0a3487
parentfd6707ed0eace7de605e070fa2a783e138a52d6e (diff)
downloadffmpeg-010f1ce95443a539d3d0405b0b089f245121333a.tar.gz
ffv1: assert that there is at least one slice
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/ffv1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 7dc6a73b89..074be4cfbb 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -113,6 +113,7 @@ av_cold int ffv1_init_slice_contexts(FFV1Context *f)
int i;
f->slice_count = f->num_h_slices * f->num_v_slices;
+ av_assert0(f->slice_count > 0);
for (i = 0; i < f->slice_count; i++) {
FFV1Context *fs = av_mallocz(sizeof(*fs));