ffv1: assert that there is at least one slice
authorPaul B Mahol <onemda@gmail.com>
Wed, 31 Oct 2012 18:01:10 +0000 (18:01 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 31 Oct 2012 19:42:07 +0000 (19:42 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/ffv1.c

index 7dc6a73..074be4c 100644 (file)
@@ -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));