path: root/demux
diff options
authorwm4 <wm4@nowhere>2018-01-06 16:04:23 +0100
committerKevin Mitchell <>2018-01-07 05:03:15 -0800
commitb71c8251b06bab3014de4aa56b50345de4f7f067 (patch)
tree08a80c11f59f9733fdd497093c31145586a83b88 /demux
parent6632d6e2872ef587f15331abe548efece10a6ba6 (diff)
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.)
Diffstat (limited to 'demux')
1 files changed, 1 insertions, 1 deletions
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;