diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-21 06:52:55 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-21 06:52:55 +0000 |
commit | 7e24aa0c13879963684400f9aad9df44c2614bd9 (patch) | |
tree | 75f599489ec90c8161142418d821b912fa72acb8 /ffserver.c | |
parent | a9c6fc7b3eca4ad4f41c5e64f010ac515c02e4cc (diff) | |
download | ffmpeg-7e24aa0c13879963684400f9aad9df44c2614bd9.tar.gz |
adjust write index if not set
Originally committed as revision 18097 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c index fd2502405e..baefd78096 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2419,6 +2419,8 @@ static int http_start_receive_data(HTTPContext *c) http_log("Error reading write index from feed file: %s\n", strerror(errno)); return -1; } + c->stream->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); + c->stream->feed_size = lseek(fd, 0, SEEK_END); lseek(fd, 0, SEEK_SET); @@ -3560,7 +3562,7 @@ static void build_feed_streams(void) exit(1); } - feed->feed_write_index = ffm_read_write_index(fd); + feed->feed_write_index = FFMAX(ffm_read_write_index(fd), FFM_PACKET_SIZE); feed->feed_size = lseek(fd, 0, SEEK_END); /* ensure that we do not wrap before the end of file */ if (feed->feed_max_size && feed->feed_max_size < feed->feed_size) |