mirror of https://github.com/mpv-player/mpv
2684280643
This unifies the subtitle rendering path. Now all subtitle rendering goes through sd_ass.c/sd_lavc.c/sd_spu.c. Before that commit, the spudec.h functions were used directly in mplayer.c, which introduced many special cases. Add sd_spu.c, which is just a small wrapper connecting the new subtitle render API with the dusty old vobsub decoder in spudec.c. One detail that changes is that we always pass the palette as extra data, instead of passing the libdvdread palette as pointer to spudec directly. This is a bit roundabout, but actually makes the code simpler and more elegant: the difference between DVD and non-DVD dvdsubs is reduced. Ideally, we would just delete spudec.c and use libavcodec's DVD sub decoder. However, DVD playback with demux_mpg produces packets incompatible to lavc. There are incompatibilities the other way around as well: packets from libavformat's vobsub demuxer are incompatible to spudec.c. So we define a new subtitle codec name for demux_mpg subs, "dvd_subtitle_mpg", which only sd_spu can decode. There is actually code in spudec.c to "assemble" fragments into complete packets, but using the whole spudec.c is easier than trying to move this code into demux_mpg to fix subtitle packets. As additional complication, Libav 9.x can't decode DVD subs correctly, so use sd_spu in that case as well. |
||
---|---|---|
.. | ||
input | ||
timeline | ||
asxparser.c | ||
asxparser.h | ||
av_common.c | ||
av_common.h | ||
av_log.c | ||
av_log.h | ||
av_opts.c | ||
av_opts.h | ||
bstr.c | ||
bstr.h | ||
cfg-mplayer.h | ||
codecs.c | ||
codecs.h | ||
command.c | ||
command.h | ||
cpudetect.c | ||
cpudetect.h | ||
defaultopts.c | ||
defaultopts.h | ||
encode.h | ||
encode_lavc.c | ||
encode_lavc.h | ||
m_config.c | ||
m_config.h | ||
m_option.c | ||
m_option.h | ||
m_property.c | ||
m_property.h | ||
m_struct.c | ||
m_struct.h | ||
mp_common.c | ||
mp_common.h | ||
mp_core.h | ||
mp_fifo.c | ||
mp_fifo.h | ||
mp_msg.c | ||
mp_msg.h | ||
mp_osd.h | ||
mp_talloc.h | ||
mplayer.c | ||
mplayer.h | ||
options.h | ||
parser-cfg.c | ||
parser-cfg.h | ||
parser-mpcmd.c | ||
parser-mpcmd.h | ||
path.c | ||
path.h | ||
playlist.c | ||
playlist.h | ||
playlist_parser.c | ||
playlist_parser.h | ||
quvi.c | ||
screenshot.c | ||
screenshot.h | ||
subopt-helper.c | ||
subopt-helper.h | ||
version.c |