mirror of https://github.com/mpv-player/mpv
e7e06a47a0
This makes ICY title changes show up at approximately the correct time, even if the demuxer buffer is huge. (It'll still be wrong if the stream byte cache contains a meaningful amount of data.) It should have the same effect for mid-stream metadata changes in e.g. OGG (untested). This is still somewhat fishy, but in parts due to ICY being fishy, and FFmpeg's metadata change API being somewhat fishy. For example, what happens if you seek? With FFmpeg AVFMT_EVENT_FLAG_METADATA_UPDATED and AVSTREAM_EVENT_FLAG_METADATA_UPDATED we hope that FFmpeg will correctly restore the correct metadata when the first packet is returned. If you seke with ICY, we're out of luck, and some audio will be associated with the wrong tag until we get a new title through ICY metadata update at an essentially random point (it's mostly inherent to ICY). Then the tags will switch back and forth, and this behavior will stick with the data stored in the demuxer cache. Fortunately, this can happen only if the HTTP stream is actually seekable, which it usually is not for ICY things. Seeking doesn't even make sense with ICY, since you can't know the exact metadata location. Basically ICY metsdata sucks. Some complexity is due to a microoptimization: I didn't want additional atomic accesses for each packet if no timed metadata is used. (It probably doesn't matter at all.) |
||
---|---|---|
.. | ||
android | ||
ar | ||
win32 | ||
atomic.h | ||
compiler.h | ||
endian.h | ||
getpid.h | ||
glob-win.c | ||
io.c | ||
io.h | ||
macOS_mpv_helper.swift | ||
macOS_swift_bridge.h | ||
macosx_application.h | ||
macosx_application.m | ||
macosx_application_objc.h | ||
macosx_compat.h | ||
macosx_events.h | ||
macosx_events.m | ||
macosx_events_objc.h | ||
macosx_menubar.h | ||
macosx_menubar.m | ||
macosx_menubar_objc.h | ||
macosx_touchbar.h | ||
macosx_touchbar.m | ||
macosx_versions.h | ||
main-fn-cocoa.c | ||
main-fn-unix.c | ||
main-fn-win.c | ||
main-fn.h | ||
mpv.exe.manifest | ||
mpv.rc | ||
path-macosx.m | ||
path-unix.c | ||
path-uwp.c | ||
path-win.c | ||
path.h | ||
polldev.c | ||
polldev.h | ||
posix-spawn.h | ||
semaphore.h | ||
semaphore_osx.c | ||
strnlen.h | ||
subprocess-dummy.c | ||
subprocess-posix.c | ||
subprocess-win.c | ||
subprocess.c | ||
subprocess.h | ||
terminal-dummy.c | ||
terminal-unix.c | ||
terminal-win.c | ||
terminal.h | ||
threads.c | ||
threads.h | ||
timer-darwin.c | ||
timer-linux.c | ||
timer-win2.c | ||
timer.c | ||
timer.h | ||
w32_keyboard.c | ||
w32_keyboard.h | ||
win32-console-wrapper.c | ||
windows_utils.c | ||
windows_utils.h |