summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-20 03:02:09 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-20 03:02:09 +0000
commit2e04edb36e1c8eab81419ca1ab10fca219c746ca (patch)
treef024afdcfaabb94d72d130239b5b3e15bc7180b8 /ffserver.c
parent10fc8424234aa214a2dc40eab1c1beaefb0f3066 (diff)
Fix a segfault when handling errors or .asx or .ram files. Silly bug
on my part. Originally committed as revision 536 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c
index 67a402a852..4e34f93065 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -400,7 +400,8 @@ static int handle_http(HTTPContext *c, long cur_time)
}
} else {
c->buffer_ptr += len;
- c->stream->bytes_served += len;
+ if (c->stream)
+ c->stream->bytes_served += len;
c->data_count += len;
if (c->buffer_ptr >= c->buffer_end) {
/* if error, exit */
@@ -1225,7 +1226,8 @@ static int http_send_data(HTTPContext *c)
} else {
c->buffer_ptr += len;
c->data_count += len;
- c->stream->bytes_served += len;
+ if (c->stream)
+ c->stream->bytes_served += len;
}
}
return 0;