summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-12-01 14:41:48 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-12-01 14:44:26 +0200
commit6939399e96b14ca0722208f2b22ea49b65b28a8b (patch)
tree551c153fd58de108b0ba0a772597e1ecab43f72c
parentb79655d3c93ec2bd37d3dff40d909d6a65d41dbb (diff)
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.
-rw-r--r--gst/isomp4/qtdemux.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index ce6ca2fe1..4b369af73 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -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) {