1
mirror of https://github.com/mpv-player/mpv synced 2024-09-09 01:16:56 +02:00
mpv/mpvcore
wm4 8a84da8102 av_common: add timebase parameter to mp_set_av_packet()
If the timebase is set, it's used for converting the packet timestamps.
Otherwise, the previous method of reinterpret-casting the mpv style
double timestamps to libavcodec style int64_t timestamps is used.

Also replace the kind of awkward mp_get_av_frame_pkt_ts() function by
mp_pts_from_av(), which simply converts timestamps in a way the old
function did. (Plus it takes a timebase parameter, similar to the
addition to mp_set_av_packet().)

Note that this should not change anything yet. The code in ad_lavc.c and
vd_lavc.c passes NULL for the timebase parameters. We could set
AVCodecContext.pkt_timebase and use that if we want to give libavcodec
"proper" timestamps.

This could be important for ad_lavc.c: some codecs (opus, probably mp3
and aac too) have weird requirements about doing decoding preroll on the
container level, and thus require adjusting the audio start timestamps
in some cases. libavcodec doesn't tell us how much was skipped, so we
either get shifted timestamps (by the length of the skipped data), or we
give it proper timestamps. (Note: libavcodec interprets or changes
timestamps only if pkt_timebase is set, which by default it is not.)
This would require selecting a timebase though, so I feel uncomfortable
with the idea. At least this change paves the way, and will allow some
testing.
2013-12-04 23:12:51 +01:00
..
input options: add option to disable using right Alt key as Alt Gr 2013-12-02 09:03:31 +01:00
player vf_vo: don't abuse option strings to set VO 2013-12-04 00:07:40 +01:00
asxparser.c core: add a playlist demuxer 2013-08-26 10:09:45 +02:00
asxparser.h
av_common.c av_common: add timebase parameter to mp_set_av_packet() 2013-12-04 23:12:51 +01:00
av_common.h av_common: add timebase parameter to mp_set_av_packet() 2013-12-04 23:12:51 +01:00
av_log.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
av_log.h mplayer: print ffmpeg library versions along with mpv version info 2013-10-14 20:14:17 +02:00
av_opts.c
av_opts.h
bstr.c bstr: make UTF-8 check stricter 2013-08-15 23:40:03 +02:00
bstr.h bstr: add UTF-8 validation and sanitation functions 2013-08-15 23:40:02 +02:00
charset_conv.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
charset_conv.h sub: don't print detected charset if it's UTF-8 2013-08-15 23:40:04 +02:00
codecs.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
codecs.h
cpudetect.c core: move contents to mpvcore (2/2) 2013-08-06 22:52:31 +02:00
cpudetect.h
encode_lavc.c Take care of some libavutil deprecations, drop support for FFmpeg 1.0 2013-11-29 17:39:57 +01:00
encode_lavc.h Take care of some libavutil deprecations, drop support for FFmpeg 1.0 2013-11-29 17:39:57 +01:00
encode.h Split mplayer.c 2013-10-30 01:53:53 +01:00
m_config.c options: add options that set defaults for af/vf/ao/vo 2013-12-01 00:12:10 +01:00
m_config.h options: add options that set defaults for af/vf/ao/vo 2013-12-01 00:12:10 +01:00
m_option.c options: provide a way for --vf to print custom help 2013-11-23 21:29:05 +01:00
m_option.h input: use separate type for command definitions 2013-11-28 19:04:16 +01:00
m_property.c command: when changing a property, allow showing an extra OSD message 2013-09-21 00:07:42 +02:00
m_property.h command: when changing a property, allow showing an extra OSD message 2013-09-21 00:07:42 +02:00
mp_common.c mp_common: add function which accepts a format string to format playback time 2013-09-15 02:51:17 +02:00
mp_common.h Reduce stheader.h includes, move stream types to mp_common.h 2013-11-23 22:08:42 +01:00
mp_memory_barrier.h
mp_msg.c mp_msg: remove gettext() support 2013-10-18 22:38:10 +02:00
mp_msg.h mp_msg: remove gettext() support 2013-10-18 22:38:10 +02:00
mp_ring.c mp_ring: fix comment typo 2013-11-22 19:12:43 +01:00
mp_ring.h mp_ring: remove unused function 2013-11-15 21:08:48 +01:00
mp_talloc.h mp_talloc: simplify a bit 2013-10-19 21:43:08 +02:00
mpv_global.h
options.c options: add option to disable using right Alt key as Alt Gr 2013-12-02 09:03:31 +01:00
options.h options: add option to disable using right Alt key as Alt Gr 2013-12-02 09:03:31 +01:00
parser-cfg.c parser-cfg: allow putting options with leading "--" 2013-10-14 23:41:26 +02:00
parser-cfg.h
parser-mpcmd.c options: don't let watch_later etc. overwite command line options 2013-10-25 22:52:54 +02:00
parser-mpcmd.h
path.c configure: uniform the defines to #define HAVE_xxx (0|1) 2013-11-03 21:59:54 +01:00
path.h Split mplayer.c 2013-10-30 01:53:53 +01:00
playlist_parser.c playlist: rewrite PLS parser 2013-11-04 23:55:41 +01:00
playlist_parser.h core: add a playlist demuxer 2013-08-26 10:09:45 +02:00
playlist.c playlist: check for NULL on caller site 2013-10-12 18:57:02 +02:00
playlist.h mplayer: fix looping of very short files 2013-09-29 21:10:45 +02:00
resolve_quvi9.c libquvi9: work around insane interaction between libquvi and libkdecore 2013-10-12 18:56:03 +02:00
resolve_quvi.c quvi: coerce libquvi 0.4 support into allowing format switching 2013-09-10 16:38:34 +02:00
resolve.h quvi: coerce libquvi 0.4 support into allowing format switching 2013-09-10 16:38:34 +02:00
version.c