From b71c8251b06bab3014de4aa56b50345de4f7f067 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 6 Jan 2018 16:04:23 +0100 Subject: 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.) --- demux/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demux/demux.c b/demux/demux.c index 952d768120..b903100b96 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -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; } -- cgit v1.2.3