Commit f807d6d2 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/pixdesc: check step/depth against each other

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 20e99a9c
...@@ -1848,8 +1848,15 @@ void ff_check_pixfmt_descriptors(void){ ...@@ -1848,8 +1848,15 @@ void ff_check_pixfmt_descriptors(void){
for (j=0; j<FF_ARRAY_ELEMS(d->comp); j++) { for (j=0; j<FF_ARRAY_ELEMS(d->comp); j++) {
const AVComponentDescriptor *c = &d->comp[j]; const AVComponentDescriptor *c = &d->comp[j];
if(j>=d->nb_components) if(j>=d->nb_components) {
av_assert0(!c->plane && !c->step_minus1 && !c->offset_plus1 && !c->shift && !c->depth_minus1); av_assert0(!c->plane && !c->step_minus1 && !c->offset_plus1 && !c->shift && !c->depth_minus1);
continue;
}
if (d->flags & PIX_FMT_BITSTREAM) {
av_assert0(c->step_minus1 >= c->depth_minus1);
} else {
av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1);
}
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment