From 533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 16 Apr 2015 21:55:10 +0200 Subject: video: do not show decoder framedrops if they're not requested libavcodec makes it impossible to distinguish dropped frames (requested with AVCodecContext.skip_frame), and cases when the decoder simply does not return a frame by default (such as with VP9, which has invisible reference frames). This confuses users when decoding VP9 video. It's basically a cosmetic issue, so just paint it over by ignoring them if framedropping is disabled. --- DOCS/man/mpv.rst | 7 +++---- player/video.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index ca1e87105e..a530725548 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -517,10 +517,9 @@ listed. rendering is too slow. Also can be incremented on "hiccups" and when the video frame couldn't be displayed on time. (``vo-drop-frame-count`` property.) If the decoder drops frames, the number of decoder-dropped frames is appended - to the display as well, e.g.: ``Dropped: 4/34``. This should almost never - happen, unless decoder-framedropping is enabled with one of the - ``--framedrop`` options, the stream contains errors, or a weird codec is in - use. (``drop-frame-count`` property.) + to the display as well, e.g.: ``Dropped: 4/34``. This happens only if + decoder-framedropping is enabled with the ``--framedrop`` options. + (``drop-frame-count`` property.) - Cache state, e.g. ``Cache: 2s+134KB``. Visible if the stream cache is enabled. The first value shows the amount of video buffered in the demuxer in seconds, the second value shows *additional* data buffered in the stream cache in diff --git a/player/video.c b/player/video.c index 2d3840b6b3..978790b31c 100644 --- a/player/video.c +++ b/player/video.c @@ -405,7 +405,8 @@ static int decode_image(struct MPContext *mpctx) talloc_free(pkt); if (had_packet && !d_video->waiting_decoded_mpi && - mpctx->video_status == STATUS_PLAYING) + mpctx->video_status == STATUS_PLAYING && + (mpctx->opts->frame_dropping & 2)) { mpctx->dropped_frames_total++; mpctx->dropped_frames++; -- cgit v1.2.3