mpv/video
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
..
decode Prefix libavcodec CODEC_FLAG_ constants with AV_ 2016-12-29 07:37:31 +01:00
filter af_lavfi, vf_lavfi: work around recent libavfilter EOF bug 2017-01-02 18:13:08 +01:00
out vo_opengl: egl: handle potential eglChooseConfig failures 2016-12-31 14:58:46 +01:00
csputils.c Remove compatibility things 2016-12-07 19:53:11 +01:00
csputils.h demux: expose demuxer colorimetry metadata to player 2016-11-08 19:16:26 +01:00
fmt-conversion.c Remove compatibility things 2016-12-07 19:53:11 +01:00
fmt-conversion.h Update license headers 2015-04-13 12:10:01 +02:00
gpu_memcpy.c Fix misspellings 2016-06-26 13:47:21 +02:00
gpu_memcpy.h video: refactor GPU memcpy usage 2015-09-25 19:18:16 +02:00
hwdec.c video: refactor how VO exports hwdec device handles 2016-05-09 20:03:22 +02:00
hwdec.h vo_opengl: hwdec_cuda: Use dynamic loading for cuda functions 2016-11-23 01:07:26 +01:00
image_writer.c Remove compatibility things 2016-12-07 19:53:11 +01:00
image_writer.h vo_image: move to global options 2016-09-05 21:04:55 +02:00
img_format.c Remove compatibility things 2016-12-07 19:53:11 +01:00
img_format.h vo_opengl: hwdec_cuda: Support P016 output surfaces 2016-11-22 20:19:58 +01:00
img_fourcc.h build: deal with endian mess 2014-07-10 00:58:56 +02:00
mp_image.c video: use demuxer-signaled duration for last video frame 2016-12-21 18:18:24 +01:00
mp_image.h video: use demuxer-signaled duration for last video frame 2016-12-21 18:18:24 +01:00
mp_image_pool.c mp_image_pool: add mp_image_pool_add 2016-02-16 12:36:50 -08:00
mp_image_pool.h mp_image_pool: add mp_image_pool_add 2016-02-16 12:36:50 -08:00
sws_utils.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
sws_utils.h vf_scale: libswscale is being stupid 2015-03-01 22:32:38 +01:00
vaapi.c video: change hw_subfmt meaning 2016-07-15 13:04:17 +02:00
vaapi.h vaapi: determine surface format in decoder, not in renderer 2016-04-11 22:03:26 +02:00
vdpau.c vdpau: get surface data as nv12 if possible 2016-06-21 21:31:58 +02:00
vdpau.h vdpau: get surface data as nv12 if possible 2016-06-21 21:31:58 +02:00
vdpau_functions.inc vo_vdpau: directly get surface size from surface for screenshots 2015-06-05 22:34:16 +02:00
vdpau_mixer.c vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00
vdpau_mixer.h vo_opengl: vdpau: fix certain cases of preemption recovery failures 2016-05-03 13:56:11 +02:00