From e9e73f8d035a0cbcf71c0eef3a402b49db2950f6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 Aug 2014 14:20:30 +0200 Subject: video: refactor queue handling This simplifies the code, and fixes an odd bug: the second-last frame was displayed for a very short duration if framedrop was enabled. The reason was that basically the time difference between second-last and last frame were skipped, because at this point EOF was already signaled. Also see commit b0959488 for a similar issue in the same code. This removes the messiness of the next_frame 2-frame queue, and strictly runs the "new frame" code when a frame is moved to the first position of the queue, instead of somehow messing with return codes. This also merges update_video() into video_output_image(). --- player/core.h | 1 - 1 file changed, 1 deletion(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 5355f720e0..6c69e5e261 100644 --- a/player/core.h +++ b/player/core.h @@ -241,7 +241,6 @@ typedef struct MPContext { struct vo *video_out; // next_frame[0] is the next frame, next_frame[1] the one after that. - // Invariant: if next_frame[1] is set, next_frame[0] also is. struct mp_image *next_frame[2]; enum playback_status video_status, audio_status; -- cgit v1.2.3