aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorJean-Tiare Le Bigot <jtlebi@gmail>2011-05-25 20:12:17 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-05-25 20:12:17 +0200
commit364889cf9c1f3c5e816a30d30d714a84765cfc29 (patch)
treefabe8a24c79528d644ab022739a049b792112b24 /libswscale/utils.c
parentb8e3b7414733a685bd1f62d65cfdfafac6cc9027 (diff)
downloadffmpeg-364889cf9c1f3c5e816a30d30d714a84765cfc29.tar.gz
Return -1 on invalid input instead of crashing.
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 56920a10a3..fada19210b 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -710,7 +710,7 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation)
{
- if (isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1;
+ if (!c || isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1;
*inv_table = c->srcColorspaceTable;
*table = c->dstColorspaceTable;