}
if (dv->device_guid) {
- if (sscanf(dv->device_guid, "%llx", (long long unsigned int *)&guid) != 1) {
+ if (sscanf(dv->device_guid, "%"SCNu64, &guid) != 1) {
av_log(context, AV_LOG_INFO, "Invalid dvguid parameter: %s\n",
dv->device_guid);
goto fail;
#if THREADS
dv->thread_loop = 1;
- pthread_mutex_init(&dv->mutex, NULL);
- pthread_cond_init(&dv->cond, NULL);
- pthread_create(&dv->receive_task_thread, NULL, iec61883_receive_task, dv);
+ if (pthread_mutex_init(&dv->mutex, NULL))
+ goto fail;
+ if (pthread_cond_init(&dv->cond, NULL))
+ goto fail;
+ if (pthread_create(&dv->receive_task_thread, NULL, iec61883_receive_task, dv))
+ goto fail;
#endif
return 0;