mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
qtdemux: Increase inflate buffer in bigger steps
1024 bytes is quite small, let's do 4096 bytes (or one page). Also remove redundant if, we're always in that case when getting here.
This commit is contained in:
parent
b79655d3c9
commit
6939399e96
1 changed files with 4 additions and 6 deletions
|
@ -6916,12 +6916,10 @@ qtdemux_inflate (void *z_buffer, guint z_length, guint * length)
|
|||
break;
|
||||
}
|
||||
|
||||
if (z.avail_out == 0) {
|
||||
*length += 1024;
|
||||
buffer = (guint8 *) g_realloc (buffer, *length);
|
||||
z.next_out = (Bytef *) (buffer + z.total_out);
|
||||
z.avail_out = 1024;
|
||||
}
|
||||
*length += 4096;
|
||||
buffer = (guint8 *) g_realloc (buffer, *length);
|
||||
z.next_out = (Bytef *) (buffer + z.total_out);
|
||||
z.avail_out += 4096;
|
||||
} while (z.avail_in > 0);
|
||||
|
||||
if (ret != Z_STREAM_END) {
|
||||
|
|
Loading…
Reference in a new issue