diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-02 00:28:27 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-05-02 18:04:05 +0200 |
commit | db4b03146cc3a355b000c4a8444efac3ee5b33f2 (patch) | |
tree | cfbae8fb4650c6b1623b577fff5c6fb994a2b162 | |
parent | 45601854b148ef2ed358d3130ed7345018c79378 (diff) | |
download | ffmpeg-db4b03146cc3a355b000c4a8444efac3ee5b33f2.tar.gz |
lavd/opengl_enc: fix window size correction code
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
-rw-r--r-- | libavdevice/opengl_enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index cbd0b3a12a..28a01181a0 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -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); |