mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
demux: silence pointless/confusing warning
This warning was printed when the demuxer cache tried to join two adjacent seek ranges, but failed if the last keyframe in the second range was within the (overlapping) first range. This is a weird corner case which to support probably would not be worth it. So this code just printed a warning and discarded the second range. As it turns out, this can happen relatively often if you seek a lot, and the seek ranges are very tiny (such as consisting of only 1 keyframe). Dropping the second range in these cases is OK and probably cheaper than trying to actually join them. Change the warning to verbose level. (It seems this could actually be "supported", because if keyframe_latest is not set, there will be no other keyframes, so it could just be unset, with the exception that q1->keyframe_latest in the code below must not be overwritten. But still, too much trouble for a special case that likely does not matter, and it would have to be tested too.)
This commit is contained in:
@@ -982,7 +982,7 @@ static void attempt_range_joining(struct demux_internal *in)
|
||||
// Some weird corner-case. We'd have to search the equivalent
|
||||
// packet in q1 to update it correctly. Better just give up.
|
||||
if (dp == q2->keyframe_latest) {
|
||||
MP_WARN(in, "stream %d: not enough keyframes\n", n);
|
||||
MP_VERBOSE(in, "stream %d: not enough keyframes for join\n", n);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user