1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 00:42:57 +00:00
mpv/audio/filter
wm4 43386a7c92 af_lavfi, vf_lavfi: work around recent libavfilter EOF bug
Looks quite like a bug. If you have a filter chain with only the
dynaudnorm filter, and send call av_buffersrc_add_frame(s, NULL), then
subsequent av_buffersink_get_frame() calls will return EAGAIN instead of
EOF.

This was apparently caused by a recent change in FFmpeg.

Some other circumstances (which I didn't fully analyze and which is due
to the playloop's absurd temporary-EOF behavior on seeks) then led the
decoder loop to send data again, but since libavfilter was stuck in the
EOF state now, it could never recover. It kept sending new input (due to
missing output), until the demuxer refused to return more audio packets.
Each time a filter error was printed.

Fortunately, it's pretty easy to workaround. We just mark the p->eof
flag as we send an EOF frame to libavfilter. The p->eof flag is used
only to recover from temporary EOF: it resets the filter if new data is
available again. We don't care much about av_buffersink_get_frame()
returning a broken EAGAIN state in this situation and essentially ignore
it, meaning if we get EAGAIN after sending EOF, we assume effectively
that EOF was fully reached.
2017-01-02 18:13:08 +01:00
..
af_channels.c Update license headers 2015-04-13 12:10:01 +02:00
af_drc.c audio/filter: remove reentrancy flag 2015-09-20 14:44:44 +02:00
af_equalizer.c audio/filter: remove reentrancy flag 2015-09-20 14:44:44 +02:00
af_format.c audio: use --audio-channels=auto behavior, except on ALSA 2016-08-04 20:49:20 +02:00
af_lavcac3enc.c Remove compatibility things 2016-12-07 19:53:11 +01:00
af_lavfi.c af_lavfi, vf_lavfi: work around recent libavfilter EOF bug 2017-01-02 18:13:08 +01:00
af_lavrresample.c Remove compatibility things 2016-12-07 19:53:11 +01:00
af_pan.c af_pan: fix typo 2016-09-19 19:01:52 +02:00
af_rubberband.c af_rubberband: default to channels=together 2016-09-19 18:59:42 +02:00
af_scaletempo.c audio: do not require full audio chain reinit for speed changes 2015-11-04 21:49:54 +01:00
af_volume.c audio: log replaygain values in af_volume instead demuxer 2016-08-13 15:06:07 +02:00
af.c m_config: add helper function for initializing af/ao/vf/vo suboptions 2016-09-02 14:49:34 +02:00
af.h audio: improve aspects of EOF handling 2016-08-18 20:38:09 +02:00
equalizer.h Update license headers 2015-04-13 12:10:01 +02:00
tools.c af: move af_from_dB() function to af_volume.c 2015-06-23 15:11:23 +02:00