Using strchr should be faster as it is optimized for the job. Also
ensure that tags are not escaped and are within {} correctly. This also
is important for performance as it allows to scan only needed areas of
the string.
Co-authored-by: Avi Halachmi (:avih) <avihpit@yahoo.com>
Co-authored-by: rcombs <rcombs@rcombs.me>
Some were duplicated between GCC and Clange. Others were missing in
Clang case. Instead test all the flags and don't make assumptions that
will get invalid over time. Testing flags is almost free.
This allows loading other types of media from the current directory,
with same_type=no, regardless of whether the current type is enabled for
autoload.
Fixes: #14287
4e5d996c3a added this as part of a series
of patches written to avoid wasteful sub redraws when playing a still
image with subs. The is_animated special case was specifically for ASS
subtitles that have animations/effects and would need repeated redraws
in the still image case. This check was done unconditionally for all ASS
subtitles, but for very big ASS subtitles, this text parsing can get a
bit expensive.
Because this function call is only ever needed for the weird edge case
of ASS subtitles over a still image, some additional logic can be added
to avoid calling is_animated in the vast majority of cases. The animated
field in demux_packet can be changed to a tristate instead where -1
indicates "unknown" (the default state). In update_subtitle, we can look
at the current state of the video tracks and decide whether or not it is
neccesary to perform is_animated and pass that knowledge to sd_ass
before any subtitle packets are decoded and thus save us from doing this
potentially expensive call.
This adds the --input-builtin-dragging option, which allows the built-in
dragging behavior to be disabled. This allows scripts to implement custom
dragging behavior with left button down events and begin-vo-dragging
command, which could only be done for other mouse buttons before.
Currently, the built-in VO dragging conflicts with the MBTN_LEFT binding,
so the binding is activated even though the VO dragging begins. Fix this
by releasing the currently down command so that MBTN_LEFT can be bound to
a useful action (such as play/pause).
The stored mouse position mouse_vo_x/y are scaled (currently only for
vo_xv), but the position equality check compares between raw position
and scaled position.
Fix this by storing and checking the raw position instead. The raw
position is useful for the next commit.
Helps with testing during cross-compilation and avoids external
dependency.
Output maybe is not that nice, but this output in our tests is not
useful anyway. We know if it changes it is beacuse one of the dependency
version changed.
Also, if the position is valid, set it to 1 / INF. Windows interprets 0
as non-progress.
Progress is quantized into uint8 range, it is good enough for this
use-case. This avoids unnecessary vo_control and
ITaskbarList3::SetProgressValue calls and should be visually
indistinguishable in practice.
Fixes#14282
The values provided since last disjoint event may include significant
error in case there are periods of slower presentation. We should look
at more localized/current values of presentation.
For more accurate approximation of vsync rate I plan to add better
algorithm to calculate it.
Revert this commit alone as it is not neccessary and gives as separation
from other changes for better regression testing.
This reverts commit f27767f59e.