summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-14 11:53:27 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-14 11:59:55 +0200
commitfdea095e349a2236f4d4a2b6e6a83b2cf001d373 (patch)
tree8096efb0feeb9a4917836bbefaf7d03cce8b4e6d /mplayer.c
parent7eb48343d47981fc38e0d4c7d9c78ae7ac2662b0 (diff)
downloadmpv-fdea095e349a2236f4d4a2b6e6a83b2cf001d373.tar.bz2
mpv-fdea095e349a2236f4d4a2b6e6a83b2cf001d373.tar.xz
demux_lavf: mark AVI timestamps non-pts to avoid messages
Playing AVI files containing B-frames with demux_lavf printed two "decreasing pts" info messages at the start of the file. We know the timestamps from AVI won't be valid pts, so add a demuxer field to convey that information to the timing code and make that not even try to use the timestamps as valid pts.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 7adde18740..2acd7e672e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2526,7 +2526,8 @@ static void determine_frame_pts(struct MPContext *mpctx)
if (opts->user_pts_assoc_mode) {
sh_video->pts_assoc_mode = opts->user_pts_assoc_mode;
} else if (sh_video->pts_assoc_mode == 0) {
- if (sh_video->codec_reordered_pts != MP_NOPTS_VALUE)
+ if (mpctx->d_video->demuxer->timestamp_type == TIMESTAMP_TYPE_PTS
+ && sh_video->codec_reordered_pts != MP_NOPTS_VALUE)
sh_video->pts_assoc_mode = 1;
else
sh_video->pts_assoc_mode = 2;