mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
98986948e8
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. |
||
---|---|---|
.. | ||
ass_mp.c | ||
ass_mp.h | ||
dec_sub.c | ||
dec_sub.h | ||
draw_bmp.c | ||
draw_bmp.h | ||
filter_sdh.c | ||
img_convert.c | ||
img_convert.h | ||
lavc_conv.c | ||
osd_dummy.c | ||
osd_font.otf | ||
osd_libass.c | ||
osd_state.h | ||
osd.c | ||
osd.h | ||
sd_ass.c | ||
sd_lavc.c | ||
sd.h |