wtv: Speed up wtv index creation
authorpopcornmix <popcornmix@gmail.com>
Fri, 29 Jan 2016 20:27:00 +0000 (20:27 +0000)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 31 Jan 2016 23:40:47 +0000 (00:40 +0100)
commitdef56677e58de9aaa516a738b6469747662ac372
tree10fdcf714880b7d08b3808ad7199caf14239997c
parent014e4e4499fd5615340d0001f2a0f02382d53718
wtv: Speed up wtv index creation

The index creation is O(N^2) with number of entries (typically thousands).
On a Pi this can take more than 60 seconds to execute for a recording of a few hours.

By replacing with an O(N) loop, this takes virtually zero time

Liked-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/wtvdec.c