Video compressions: fixes

This commit is contained in:
Martin Pulec
2013-11-06 15:06:54 +01:00
parent 401b59f644
commit e211aba493
2 changed files with 2 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ void *fastdxt_init(char *num_threads_str)
compress = calloc(1, sizeof(struct video_compress));
/* initial values */
compress->num_threads = 0;
if(num_threads_str == NULL)
if(num_threads_str == NULL || num_threads_str[0] == '\0')
compress->num_threads = NUM_THREADS_DEFAULT;
else
compress->num_threads = atoi(num_threads_str);

View File

@@ -252,7 +252,7 @@ void * jpeg_compress_init(char * opts)
s->restart_interval = -1;
if(opts) {
if(opts && opts[0] != '\0') {
char *tok, *save_ptr = NULL;
gpujpeg_set_default_parameters(&s->encoder_param);
tok = strtok_r(opts, ":", &save_ptr);