aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-06 03:12:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-06 03:16:24 +0200
commit856834a77f4145adc5951e8b08984981fed4463d (patch)
tree8d20b4858dd4d03289c3546a3f5729cd11360b92 /libavcodec/ffv1.c
parent5709e20199b35f80ed2bd90385d4c87c79859d17 (diff)
downloadffmpeg-856834a77f4145adc5951e8b08984981fed4463d.tar.gz
ffv1: change w/h asserts to check as the condition can likely happen
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index f946122dfb..5ce8e7aa20 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -700,6 +700,9 @@ static void write_header(FFV1Context *f){
static av_cold int common_init(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
+ if(!avctx->width || !avctx->height)
+ return AVERROR_INVALIDDATA;
+
s->avctx= avctx;
s->flags= avctx->flags;
@@ -710,7 +713,6 @@ static av_cold int common_init(AVCodecContext *avctx){
s->width = avctx->width;
s->height= avctx->height;
- assert(s->width && s->height);
//defaults
s->num_h_slices=1;
s->num_v_slices=1;