1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavd/opengl_enc: fix window size correction code

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit is contained in:
Lukasz Marek 2014-05-02 00:28:27 +02:00
parent 45601854b1
commit db4b03146c

View File

@ -872,8 +872,8 @@ static av_cold int opengl_prepare_vertex(AVFormatContext *s)
int tex_w, tex_h;
if (opengl->window_width > opengl->max_viewport_width || opengl->window_height > opengl->max_viewport_height) {
opengl->window_width = FFMAX(opengl->window_width, opengl->max_viewport_width);
opengl->window_height = FFMAX(opengl->window_height, opengl->max_viewport_height);
opengl->window_width = FFMIN(opengl->window_width, opengl->max_viewport_width);
opengl->window_height = FFMIN(opengl->window_height, opengl->max_viewport_height);
av_log(opengl, AV_LOG_WARNING, "Too big viewport requested, limited to %dx%d", opengl->window_width, opengl->window_height);
}
glViewport(0, 0, opengl->window_width, opengl->window_height);