summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-06-06 11:23:56 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-10-27 20:27:39 +0300
commitf604df4f766604e9ebfcbb9b972ac1487c1347ce (patch)
tree4313e0860d3100ef2132362541fdc8d4005a4cb7 /libmpcodecs
parent786b5e4352250ba4f3fc76ce7e8379cb2078d7aa (diff)
downloadmpv-f604df4f766604e9ebfcbb9b972ac1487c1347ce.tar.bz2
mpv-f604df4f766604e9ebfcbb9b972ac1487c1347ce.tar.xz
vd_ffmpeg: Minor code simplification.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31336 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index db5d53d0df..668460304d 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -438,7 +438,8 @@ static void draw_slice(struct AVCodecContext *s,
}
}
if (y < sh->disp_h) {
- mpcodecs_draw_slice (sh, source, strides, sh->disp_w, (y+height)<=sh->disp_h?height:sh->disp_h-y, 0, y);
+ height = FFMIN(height, sh->disp_h-y);
+ mpcodecs_draw_slice (sh, source, strides, sh->disp_w, height, 0, y);
}
}