diff options
author | wm4 <wm4@nowhere> | 2015-04-16 21:55:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-16 21:55:10 +0200 |
commit | 533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64 (patch) | |
tree | fb8c22dcad647801890b6bcee56de00600adbdc5 | |
parent | 9cabef39747e955eb9837d1d0c15d2956d8c5c3d (diff) | |
download | mpv-533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64.tar.bz2 mpv-533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64.tar.xz |
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.
-rw-r--r-- | DOCS/man/mpv.rst | 7 | ||||
-rw-r--r-- | 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++; |