summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-16 21:55:10 +0200
committerwm4 <wm4@nowhere>2015-04-16 21:55:10 +0200
commit533b0c70e1f2cf5c1358c7147ae5546fcf1f6a64 (patch)
treefb8c22dcad647801890b6bcee56de00600adbdc5 /player/video.c
parent9cabef39747e955eb9837d1d0c15d2956d8c5c3d (diff)
downloadmpv-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.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c3
1 files changed, 2 insertions, 1 deletions
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++;