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

Return -1 on invalid input instead of crashing.

This commit is contained in:
Jean-Tiare Le Bigot 2011-05-25 20:12:17 +02:00 committed by Carl Eugen Hoyos
parent b8e3b74147
commit 364889cf9c

View File

@ -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;