flvmux: Fix writing of the index for < 128 buffers

Partially fixes bug #590447.
This commit is contained in:
Sebastian Dröge 2009-08-03 20:08:00 +02:00
parent cb4eb5714c
commit 8b9d547c14

View file

@ -1032,7 +1032,8 @@ gst_flv_mux_write_index (GstFlvMux * mux)
/* We write at most 128 elements */
index_skip = (index_len > 128) ? 1 + index_len / 128 : 1;
index_len =
(index_len <= 128) ? 1 : (index_len + index_skip - 1) / index_skip;
(index_len <=
128) ? index_len : (index_len + index_skip - 1) / index_skip;
tmp = gst_buffer_new_and_alloc (2 + 5 + 1 + 4 + index_len * (1 + 8));
data = GST_BUFFER_DATA (tmp);