summaryrefslogtreecommitdiffstats
path: root/player/video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-11 21:28:01 +0200
committerwm4 <wm4@nowhere>2017-08-11 21:29:35 +0200
commitc3916406451cddfb9daa42699dcd2163bff1a0eb (patch)
treebf2726829d142fdee6a62e3fb76549873a119e2e /player/video.c
parent8b1d4b978de855d62efd9c3f54216196e095b5bc (diff)
downloadmpv-c3916406451cddfb9daa42699dcd2163bff1a0eb.tar.bz2
mpv-c3916406451cddfb9daa42699dcd2163bff1a0eb.tar.xz
player: fix --lavfi-complex freeze
Commit 0e0b87b6f3297 fixed that dropped packets did not trigger further work correctly. But it also made trivial --lavfi-complex freeze. The reason is that the meaning if DATA_AGAIN was overloaded: the decoders meant that they should be called again, while lavfi.c meant that other outputs needed to be checked again. Rename the latter meaning to DATA_STARVE, which means that the current input will deliver no more data, until "other" work has been done (like reading other outputs, or feeding input). The decoders never return DATA_STARVE, because they don't get input from the player core (instead, they get it from the demuxer directly, which is why they still can return DATA_WAIT). Also document the DATA_* semantics in the enum. Fixes #4746.
Diffstat (limited to 'player/video.c')
-rw-r--r--player/video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c
index 108d65a35b..414629c3c2 100644
--- a/player/video.c
+++ b/player/video.c
@@ -617,6 +617,7 @@ static int decode_image(struct MPContext *mpctx)
switch (res) {
case DATA_WAIT: return VD_WAIT;
case DATA_OK:
+ case DATA_STARVE:
case DATA_AGAIN: return VD_PROGRESS;
case DATA_EOF: return VD_EOF;
default: abort();