openjpegdec: Don't crash when decoding returns NULL data for any component

https://bugzilla.gnome.org/show_bug.cgi?id=758943
This commit is contained in:
Sebastian Dröge 2015-12-17 15:56:57 +01:00
parent d8dacd50bf
commit 9b4611ccae

View file

@ -1050,6 +1050,15 @@ gst_openjpeg_dec_handle_frame (GstVideoDecoder * decoder,
goto decode_error;
#endif
{
gint i;
for (i = 0; i < image->numcomps; i++) {
if (image->comps[i].data == NULL)
goto decode_error;
}
}
gst_buffer_unmap (frame->input_buffer, &map);
ret = gst_openjpeg_dec_negotiate (self, image);