1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 15:22:09 +00:00
mpv/video/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
..
refqueue.c vf_vavpp: get rid of mp_refqueue_is_interlaced() 2016-07-15 20:37:46 +02:00
refqueue.h vf_vavpp: get rid of mp_refqueue_is_interlaced() 2016-07-15 20:37:46 +02:00
vf_buffer.c
vf_crop.c vf_crop: support opaque hardware decoding formats 2016-05-19 22:56:11 +02:00
vf_d3d11vpp.c win32: build with -DINITGUID 2016-09-28 21:38:52 +10:00
vf_dlopen.c Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
vf_dlopen.h
vf_dsize.c
vf_eq.c
vf_expand.c
vf_flip.c
vf_format.c vo_opengl: generalize HDR tone mapping mechanism 2016-07-03 19:42:52 +02:00
vf_gradfun.c
vf_lavfi.c af_lavfi, vf_lavfi: work around recent libavfilter EOF bug 2017-01-02 18:13:08 +01:00
vf_lavfi.h
vf_mirror.c
vf_noformat.c
vf_pullup.c
vf_rotate.c vf_rotate: allow arbitrary rotation 2016-08-19 09:37:52 +02:00
vf_scale.c options: make mp_vo_opts options an actual sub-option group 2016-08-30 23:50:57 +02:00
vf_stereo3d.c
vf_sub.c
vf_vapoursynth.c mp_image: split colorimetry metadata into its own struct 2016-07-03 19:42:52 +02:00
vf_vavpp.c vf_vavpp: get rid of mp_refqueue_is_interlaced() 2016-07-15 20:37:46 +02:00
vf_vdpaupp.c vo_opengl: vdpau interop without RGB conversion 2016-06-19 19:58:40 +02:00
vf_yadif.c
vf.c vf_vdpaurb: remove this filter 2016-11-22 15:54:44 +01:00
vf.h video: don't discard video frames after endpts 2016-08-18 20:37:25 +02:00