diff options
author | wm4 <wm4@nowhere> | 2019-05-24 20:12:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:04 +0200 |
commit | 6d11668a9c448674ac04ef61bf902c867671d8db (patch) | |
tree | 34336a83e651cebbbde0b089587dc3c37dea1d77 /demux | |
parent | 327f3fc848e6e30d431411e103e10dbae7f461e3 (diff) | |
download | mpv-6d11668a9c448674ac04ef61bf902c867671d8db.tar.bz2 mpv-6d11668a9c448674ac04ef61bf902c867671d8db.tar.xz |
demux: use no overlapping packets for lossless audio
Worthless optimization, but at least it justifies that the
--audio-backward-overlap option has an "auto" choice. Tested with PCM
and FLAC.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c index 27866fba83..481b87e0c7 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -33,6 +33,7 @@ #include "options/m_config.h" #include "options/m_option.h" #include "mpv_talloc.h" +#include "common/av_common.h" #include "common/msg.h" #include "common/global.h" #include "common/recorder.h" @@ -952,8 +953,8 @@ static void demux_add_sh_stream_locked(struct demux_internal *in, switch (ds->type) { case STREAM_AUDIO: ds->back_preroll = in->opts->audio_back_preroll; - if (ds->back_preroll < 0) - ds->back_preroll = 1; // auto + if (ds->back_preroll < 0) // auto + ds->back_preroll = mp_codec_is_lossless(sh->codec->codec) ? 0 : 1; break; case STREAM_VIDEO: ds->back_preroll = in->opts->video_back_preroll; |