diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2017-10-29 00:19:37 +0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-30 12:44:11 +0100 |
commit | 98986948e8e124c5fe5beb4afa12c6995940fbb6 (patch) | |
tree | 9f3422f2ba8164283f94ca82a3fe767c68207535 /DOCS/release-policy.md | |
parent | e9dc4ac86f9dbd59147963d08ec8447bba3ed0bb (diff) | |
download | mpv-98986948e8e124c5fe5beb4afa12c6995940fbb6.tar.bz2 mpv-98986948e8e124c5fe5beb4afa12c6995940fbb6.tar.xz |
lavc_conv: make disable_styles faster
The current invocation of bstr_cut is as good as no cutting at all.
Almost the entire header is reread in every iteration of the loop.
I don't know how many styles libavcodec tends to generate, but if
(now or in the future) it generates many, then this loop is slow
for no good reason. If anything, the code would be more clear and
have the same performance if it didn't call bstr_cut at all.
The intention here (and the sensible thing regardless) seems to be
to skip the part of the string that bstr_find has already looked
through and found nothing. This commit additionally skips the whole
substring, because overlapping matches are impossible.
Diffstat (limited to 'DOCS/release-policy.md')
0 files changed, 0 insertions, 0 deletions