Browse Source

Return -1 on invalid input instead of crashing.

tags/n0.8
Jean-Tiare Le Bigot Carl Eugen Hoyos 14 years ago
parent
commit
364889cf9c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libswscale/utils.c

+ 1
- 1
libswscale/utils.c 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;


Loading…
Cancel
Save