* Also include time.h for nanosleep()
authorZdenek Kabelac <kabi@informatics.muni.cz>
Mon, 18 Feb 2002 10:20:03 +0000 (10:20 +0000)
committerZdenek Kabelac <kabi@informatics.muni.cz>
Mon, 18 Feb 2002 10:20:03 +0000 (10:20 +0000)
   by:  Philipp Matthias Hahn <pmhahn@titan.lahn.de>

Originally committed as revision 309 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c
libav/grab.c

index d2d7479..f4a6250 100644 (file)
@@ -880,8 +880,9 @@ static int http_prepare_data(HTTPContext *c)
                         }
                     }
                 } else {
-                send_it:
-                    av_write_packet(&c->fmt_ctx, &pkt);
+               send_it:
+                    if (av_write_packet(&c->fmt_ctx, &pkt))
+                       c->state = HTTPSTATE_SEND_DATA_TRAILER;
                 }
                 
                 av_free_packet(&pkt);
index 774c5b0..7dd6fd7 100644 (file)
@@ -23,7 +23,7 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/time.h>
-
+#include <time.h>
 
 typedef struct {
     int fd;