]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/unix.c
riff: add PLV1 fourcc to mpeg4
[ffmpeg] / libavformat / unix.c
index 167efabf414acac016b0a138ecd286b3147617f3..ab57c681953c294c9480fa48bbbd72c7615f1956 100644 (file)
@@ -71,7 +71,7 @@ static int unix_open(URLContext *h, const char *filename, int flags)
     s->addr.sun_family = AF_UNIX;
     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));
 
-    if ((fd = socket(AF_UNIX, s->type, 0)) < 0)
+    if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
         return ff_neterrno();
 
     if (s->listen) {
@@ -83,7 +83,7 @@ static int unix_open(URLContext *h, const char *filename, int flags)
         }
     } else {
         ret = ff_listen_connect(fd, (struct sockaddr *)&s->addr,
-                                sizeof(s->addr), s->timeout, h);
+                                sizeof(s->addr), s->timeout, h, 0);
         if (ret < 0)
             goto fail;
     }
@@ -93,7 +93,7 @@ static int unix_open(URLContext *h, const char *filename, int flags)
     return 0;
 
 fail:
-    if (s->listen && ret != EADDRINUSE)
+    if (s->listen && AVUNERROR(ret) != EADDRINUSE)
         unlink(s->addr.sun_path);
     if (fd >= 0)
         closesocket(fd);