Skip to content
Snippets Groups Projects
Commit 4290c572 authored by Alexandre Janniaux's avatar Alexandre Janniaux
Browse files

video_output: fix comment and move do_snapshot

The comment /* Get the subpicture to be displayed */ was written twice
in places where no subpictures were involved. In addition, do_snapshot
was computed where the rendering date was computed although it was not
used there.

Move the do_snapshot computation just before it's used, replace the
misplaced comments by comment actually describing what's follow, and
rewrite the removed comment where spu_Render actually returns the
subpicture.
parent 7fc16277
No related branches found
No related tags found
No related merge requests found
Pipeline #87334 passed with stage
in 15 minutes and 30 seconds
...@@ -1126,9 +1126,8 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now) ...@@ -1126,9 +1126,8 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now)
vlc_mutex_lock(&sys->display_lock); vlc_mutex_lock(&sys->display_lock);
/* /*
* Get the subpicture to be displayed * Get the rendering date for the current subpicture to be displayed.
*/ */
const bool do_snapshot = vout_snapshot_IsRequested(sys->snapshot);
vlc_tick_t system_now = vlc_tick_now(); vlc_tick_t system_now = vlc_tick_now();
vlc_tick_t render_subtitle_date; vlc_tick_t render_subtitle_date;
if (sys->pause.is_on) if (sys->pause.is_on)
...@@ -1150,8 +1149,11 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now) ...@@ -1150,8 +1149,11 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now)
} }
/* /*
* Get the subpicture to be displayed * Check whether we let the display draw the subpicture itself (when
* do_dr_spu=true), and if we can fallback to blending the subpicture
* ourselves (do_early_spu=true).
*/ */
const bool do_snapshot = vout_snapshot_IsRequested(sys->snapshot);
const bool do_dr_spu = !do_snapshot && const bool do_dr_spu = !do_snapshot &&
vd->info.subpicture_chromas && vd->info.subpicture_chromas &&
*vd->info.subpicture_chromas != 0; *vd->info.subpicture_chromas != 0;
...@@ -1203,6 +1205,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now) ...@@ -1203,6 +1205,7 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool render_now)
} }
} }
/* Get the subpicture to be displayed. */
video_format_t fmt_spu_rot; video_format_t fmt_spu_rot;
video_format_ApplyRotation(&fmt_spu_rot, &fmt_spu); video_format_ApplyRotation(&fmt_spu_rot, &fmt_spu);
subpicture_t *subpic = !sys->spu ? NULL : subpicture_t *subpic = !sys->spu ? NULL :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment