]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/iec61883.c
lavu: add an API function to return the FFmpeg version string
[ffmpeg] / libavdevice / iec61883.c
index b29aad1d48a1b8d214609b7213e1d1dc9b106552..5c74cc7729cab5f6221e54712a7bb2f41b209514 100644 (file)
@@ -271,7 +271,7 @@ static int iec61883_read_header(AVFormatContext *context)
     }
 
     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;
@@ -392,9 +392,12 @@ static int iec61883_read_header(AVFormatContext *context)
 
 #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;