diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-02-19 00:46:40 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-02-19 12:13:08 +0000 |
commit | 8c46cce875652784f7e972f9a155d5056ad08d5c (patch) | |
tree | f497040b5bd6379344d88b98dac7d0ec542acd97 | |
parent | ec9add84a8b1afcc79725f46489c7baea9a7a64d (diff) |
flvdemux: minor micro-optimisation
We know these values don't change during the loop, but the compiler
doesn't and has to re-check them for every iteration.
-rw-r--r-- | gst/flv/gstflvparse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c index 935af21ba..86c638f4c 100644 --- a/gst/flv/gstflvparse.c +++ b/gst/flv/gstflvparse.c @@ -422,8 +422,11 @@ gst_flv_parse_tag_script (GstFLVDemux * demux, GstBuffer * buffer) if (demux->index && demux->times && demux->filepositions && !demux->random_access) { + guint num; + /* If an index was found and we're in push mode, insert associations */ - for (i = 0; i < MIN (demux->times->len, demux->filepositions->len); i++) { + num = MIN (demux->times->len, demux->filepositions->len); + for (i = 0; i < num; i++) { GstIndexAssociation associations[2]; guint64 time, fileposition; |