aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>2014-04-28 23:48:36 -0400
committerReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>2014-04-29 01:08:06 -0400
commit5b881499a8e40ad0aa3424ec4d9adeb8008c4189 (patch)
treec88d5575208e0605ea3827bd360b5482790a3bd3
parent898192e0299ed35e03401fa22df2f7e496b95a52 (diff)
downloadffmpeg-5b881499a8e40ad0aa3424ec4d9adeb8008c4189.tar.gz
ffserver: do not ignore lseek() return
Should fix FFmpeg Coverity Scan issue #732177 Signed-off-by: Reynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
-rw-r--r--ffserver.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c
index 589ba5f331..9104984776 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2755,8 +2755,11 @@ static int http_receive_data(HTTPContext *c)
/* a packet has been received : write it in the store, except
if header */
if (c->data_count > FFM_PACKET_SIZE) {
- /* XXX: use llseek or url_seek */
- lseek(c->feed_fd, feed->feed_write_index, SEEK_SET);
+ /* XXX: use llseek or url_seek
+ * XXX: Should probably fail? */
+ if (lseek(c->feed_fd, feed->feed_write_index, SEEK_SET) == -1)
+ http_log("Seek to %"PRId64" failed\n", feed->feed_write_index);
+
if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) {
http_log("Error writing to feed file: %s\n", strerror(errno));
goto fail;