1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

swscale: Assert that pixel format descriptor is not NULL

This may help static analyzers, the pixel format is checked
during initialization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-12 14:39:28 +02:00
parent 3dea13e710
commit ae0148ff60
2 changed files with 3 additions and 0 deletions

View File

@ -784,6 +784,8 @@ static int check_image_pointers(const uint8_t * const data[4], enum AVPixelForma
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
int i;
av_assert2(desc);
for (i = 0; i < 4; i++) {
int plane = desc->comp[i].plane;
if (!data[plane] || !linesizes[plane])

View File

@ -1036,6 +1036,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
return AVERROR(EINVAL);
}
}
av_assert2(desc_src && desc_dst);
i = flags & (SWS_POINT |
SWS_AREA |