vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jan 21 13:11:53 2021 +0100| [4ec95bb1668140f7022736ca0221e13c2cac98a8] | committer: Steve Lhomme
video_output: remove always NULL displayed.next Now we only set displayed.current to the picture we want to display. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ec95bb1668140f7022736ca0221e13c2cac98a8 --- src/video_output/video_output.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index c861f8df6c..5e31ad097f 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -127,7 +127,6 @@ typedef struct vout_thread_sys_t bool is_interlaced; picture_t *decoded; // decoded picture before passed through chain_static picture_t *current; - picture_t *next; } displayed; struct { @@ -932,12 +931,6 @@ static void ThreadFilterFlush(vout_thread_sys_t *sys, bool is_locked) sys->displayed.current = NULL; } - if (sys->displayed.next) - { - picture_Release( sys->displayed.next ); - sys->displayed.next = NULL; - } - if (!is_locked) vlc_mutex_lock(&sys->filter.lock); filter_chain_VideoFlush(sys->filter.chain_static); @@ -1419,7 +1412,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now) if (!render_now) { const vlc_tick_t late = system_now - system_pts; - if (unlikely(late > 0)) + if (unlikely(late > 0)) { msg_Dbg(vd, "picture displayed late (missing %"PRId64" ms)", MS_FROM_VLC_TICK(late)); vout_statistic_AddLate(&sys->statistic, 1); @@ -1485,17 +1478,8 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline) if (frame_by_frame) { picture_t *next; - if (likely(!sys->displayed.next)) - { - next = - ThreadDisplayPreparePicture(vout, !sys->displayed.current, true, &paused); - } - else - { - // remaining from normal playback - next = sys->displayed.next; - sys->displayed.next = NULL; - } + next = + ThreadDisplayPreparePicture(vout, !sys->displayed.current, true, &paused); if (next) { @@ -1856,7 +1840,6 @@ static int vout_Start(vout_thread_sys_t *vout, vlc_video_context *vctx, const vo assert(sys->private.display_pool != NULL && sys->private.private_pool != NULL); sys->displayed.current = NULL; - sys->displayed.next = NULL; sys->displayed.decoded = NULL; sys->displayed.date = VLC_TICK_INVALID; sys->displayed.timestamp = VLC_TICK_INVALID; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
