[FFmpeg-cvslog] r17174 - trunk/ffserver.c
bcoudurier
subversion
Thu Feb 12 03:23:26 CET 2009
Author: bcoudurier
Date: Thu Feb 12 03:23:25 2009
New Revision: 17174
Log:
Check return value of ffm_write_write_index and ffm_read_write_index.
Patch by Patrik Kullman, patrik at yes dot nu
Modified:
trunk/ffserver.c
Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c Thu Feb 12 03:17:16 2009 (r17173)
+++ trunk/ffserver.c Thu Feb 12 03:23:25 2009 (r17174)
@@ -2413,7 +2413,10 @@ static int http_start_receive_data(HTTPC
}
c->feed_fd = fd;
- c->stream->feed_write_index = ffm_read_write_index(fd);
+ if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) {
+ http_log("Error reading write index from feed file: %s\n", strerror(errno));
+ return -1;
+ }
c->stream->feed_size = lseek(fd, 0, SEEK_END);
lseek(fd, 0, SEEK_SET);
@@ -2479,7 +2482,10 @@ static int http_receive_data(HTTPContext
feed->feed_write_index = FFM_PACKET_SIZE;
/* write index */
- ffm_write_write_index(c->feed_fd, feed->feed_write_index);
+ if (ffm_write_write_index(c->feed_fd, feed->feed_write_index) < 0) {
+ http_log("Error writing index to feed file: %s\n", strerror(errno));
+ goto fail;
+ }
/* wake up any waiting connections */
for(c1 = first_http_ctx; c1 != NULL; c1 = c1->next) {
More information about the ffmpeg-cvslog
mailing list