indeo5: Fix null pointer dereference

Fixes Ticket803
Bug found by: Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-20 22:06:35 +01:00
parent 452406bd5b
commit f27930cd9a
1 changed files with 3 additions and 0 deletions

View File

@ -611,6 +611,9 @@ void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch)
const int16_t *src = plane->bands[0].buf;
uint32_t pitch = plane->bands[0].pitch;
if(!src)
return;
for (y = 0; y < plane->height; y++) {
for (x = 0; x < plane->width; x++)
dst[x] = av_clip_uint8(src[x] + 128);