swscale: Fix an undefined behaviour
authorLuca Barbato <lu_zero@gentoo.org>
Thu, 1 May 2014 22:21:23 +0000 (00:21 +0200)
committerReinhard Tartler <siretart@tauware.de>
Thu, 8 May 2014 23:56:00 +0000 (19:56 -0400)
commita56a9e65c6a17dd8b6303dd45bdc3e3368093092
tree005c59c27ca69192f7acf5684eb3cb1dff8c5c78
parent428b629eb28907738ae98331b9f6c25cc9a8f3c8
swscale: Fix an undefined behaviour

Prevent a division by zero down the codepath.

Sample-Id: 00001721-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 3a177a9cca924e097265b32f9282814f6b653e08)
libswscale/utils.c