mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-02-04 13:01:52 +00:00
mjpeg: remove wrong g_return_if_fail
After calling jpeg_read_scanlines, spice-gtk checks that we read the amount of lines we expected, and if not, it returns early. This is doubly wrong: * jpeg_read_scanlines is documented as returning at most the number of lines requested, but it also warns that an application shouldn't rely on getting exactly the number of scanlines requested. In this case, if rec_outbuf_height is bigger than 1, we'll get a short read on the last line of odd-sized images, thus triggering the g_return_if_fail * returning from this function without calling jpeg_abort will cause libjpeg to abort next time we use it because jpeg_start_decompress was called before This commit removes this check and early return.
This commit is contained in:
parent
b306504cf9
commit
bb30232fcd
@ -116,8 +116,6 @@ void stream_mjpeg_data(display_stream *st)
|
||||
}
|
||||
lines_read = jpeg_read_scanlines(&st->mjpeg_cinfo, lines,
|
||||
st->mjpeg_cinfo.rec_outbuf_height);
|
||||
// this shouldn't happen either..
|
||||
g_return_if_fail(lines_read == st->mjpeg_cinfo.rec_outbuf_height);
|
||||
#ifndef JCS_EXTENSIONS
|
||||
{
|
||||
uint8_t *s = lines[0];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user