]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/unix.c
avformat/matroskadec: Fix rounding error with codec_delay
[ffmpeg] / libavformat / unix.c
index 70d00ef47b9cac1fcce2fceb531b5af947877f3a..4f01d14a938e24d480cd89264e3f30489e01f0bd 100644 (file)
@@ -72,6 +72,9 @@ static int unix_open(URLContext *h, const char *filename, int flags)
     if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
         return ff_neterrno();
 
+    if (s->timeout < 0 && h->rw_timeout)
+        s->timeout = h->rw_timeout / 1000;
+
     if (s->listen) {
         ret = ff_listen_bind(fd, (struct sockaddr *)&s->addr,
                              sizeof(s->addr), s->timeout, h);