1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-29 10:32:15 +00:00
mpv/core
wm4 d302ac285f mplayer: reset audio/video delay if there's no next video frame
mpctx->delay is used to control audio/video sync. If more audio than
video has been played, it grows larger, meaning A/V desync is happening.

This logic is a bit broken when video has ended, and audio is still
playing. In that case, it tries to read additional video frames from the
video decoder (because even if you don't feed new packets to the
decoder, it could still return delayed frames). For that, the code to
determine whether frames should be dropped is invoked
(check_framedrop()). This function detects that video is behind audio (mpctx-
>delay growing big),
and attempts to issue a framedrop.

Reset mpctx->delay if there's no more video.

This fixes the the frame drop display "counting up" on each playloop
iteration when playing audio files with cover art. These files are
basically audio+video files with a single video frame. When playing
these files the the corner case of having run out of video while audio
is still playing is the normal case.

Also reset mpctx->last_av_difference. This is not updated anymore if
video ends (since update_avsync() sets it, but it's not called if
video_left is false). This removes the "stuck" A/V sync value when video
ends. With audio files containing cover art we would display a
meaningless value over the duration of the whole file otherwise.
2013-02-03 21:08:26 +01:00
..
input input: free all queued/allocated commands on exit 2013-02-03 21:08:26 +01:00
timeline cache: refactor how cache enabling is done 2012-12-03 21:08:51 +01:00
asxparser.c
asxparser.h
av_log.c demux_lavf: add support for libavdevice 2012-12-03 21:08:51 +01:00
av_log.h
av_opts.c
av_opts.h
bstr.c Replace strsep() uses 2013-01-13 17:32:39 +01:00
bstr.h Replace strsep() uses 2013-01-13 17:32:39 +01:00
cfg-mplayer.h x11: cleanup, refactor 2013-01-27 13:30:53 +01:00
codec-cfg.c video: simplify decoder pixel format handling 2013-01-13 17:39:31 +01:00
codec-cfg.h video: simplify decoder pixel format handling 2013-01-13 17:39:31 +01:00
command.c mplayer: make advancing the playlist respect looping 2013-02-03 16:52:48 +01:00
command.h
cpudetect.c
cpudetect.h
defaultopts.c x11: cleanup, refactor 2013-01-27 13:30:53 +01:00
defaultopts.h
encode_lavc.c sdl, encode_lavc: fix copyright headers 2012-12-28 11:41:30 +01:00
encode_lavc.h sdl, encode_lavc: fix copyright headers 2012-12-28 11:41:30 +01:00
encode.h
m_config.c
m_config.h
m_option.c video: add --autofit and --autofit-larger options 2013-01-23 10:56:36 +01:00
m_option.h video: add --autofit and --autofit-larger options 2013-01-23 10:56:36 +01:00
m_property.c
m_property.h
m_struct.c
m_struct.h
mp_common.c mp_common: improve OSD/status time formatting 2013-02-03 15:41:18 +01:00
mp_common.h mp_common: add some rectangle utility functions 2013-01-13 20:04:14 +01:00
mp_core.h mplayer: make advancing the playlist respect looping 2013-02-03 16:52:48 +01:00
mp_fifo.c input: do not generate double clicks for mouse wheel 2012-12-03 21:08:52 +01:00
mp_fifo.h
mp_msg.c mp_msg, getch2: unix tty background support 2013-01-23 18:05:34 +01:00
mp_msg.h
mp_osd.h core: minor cleanups 2012-11-20 18:00:16 +01:00
mp_talloc.h video/filter: change filter API, use refcounting, remove filter DR 2013-01-13 20:04:10 +01:00
mpc_info.h
mplayer.c mplayer: reset audio/video delay if there's no next video frame 2013-02-03 21:08:26 +01:00
mplayer.h sub: remove vobsub reader in favor of ffmpeg vobsub demuxer 2012-12-11 00:37:54 +01:00
options.h x11: cleanup, refactor 2013-01-27 13:30:53 +01:00
parser-cfg.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
parser-cfg.h
parser-mpcmd.c options: handle -v during pre-parsing command line 2012-12-12 23:02:03 +01:00
parser-mpcmd.h
path.c path: add mp_find_config_file and reorganize some of the code 2012-12-15 17:38:00 +01:00
path.h path: add mp_find_config_file and reorganize some of the code 2012-12-15 17:38:00 +01:00
playlist_parser.c options: rename -ss and -endpos, allow relative times 2012-11-16 21:21:15 +01:00
playlist_parser.h
playlist.c
playlist.h
quvi.c Fix lots of bugs in mp_http URL handling 2013-01-10 14:11:26 +01:00
screenshot.c screenshot: minor simplification, prefer VF over VO 2013-01-30 23:41:22 +01:00
screenshot.h
subopt-helper.c
subopt-helper.h
version.c build: identify the build time of the binary in the versioning output 2012-12-03 21:08:51 +01:00