Skip to content

Commit

Permalink
vo_opengl: fix --blend-subtitles handling
Browse files Browse the repository at this point in the history
The intention was that if --blend-subtitles is enabled, the frame should
always be re-rendered instead of using e.g. a cached scaled frame. The
reason is that subtitles can change anyway, e.g. if you pause and change
subtitle size and such.

On the other hand, if the frame is marked as repeated, it should always
use the cached copy. Actually "simplify" this and drop the cache only if
playback is paused (which frame->still indicates indirectly).

Also see PR #3773.
  • Loading branch information
wm4 committed Nov 7, 2016
1 parent eac9e91 commit cd47029
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions video/out/opengl/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2802,8 +2802,8 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo)
bool is_new = frame->frame_id != p->image.id;

// Redrawing a frame might update subtitles.
if (!frame->repeat && p->opts.blend_subs)
is_new = false;
if (frame->still && p->opts.blend_subs)
is_new = true;

if (is_new || !p->output_fbo_valid) {
p->output_fbo_valid = false;
Expand Down

0 comments on commit cd47029

Please sign in to comment.