ref: 21ebba38febf533ec6727b5f14fa78234524f27b
parent: cc1fff58eeaf776a79ca88375c64cbceb908df21
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Fri May 12 09:17:10 EDT 2017
Minor comment updates. No code changes.
--- a/src/http.c
+++ b/src/http.c
@@ -1184,8 +1184,8 @@
if(OP_UNLIKELY(ret<=0))return size<=0?OP_EREAD:OP_FALSE;
/*We read some data.*/
/*Make sure the starting characters are "HTTP".
- Otherwise we could wind up waiting forever for a response from
- something that is not an HTTP server.*/
+ Otherwise we could wind up waiting for a response from something that is
+ not an HTTP server until we time out.*/
if(size<4&&op_strncasecmp(buf,"HTTP",OP_MIN(size+ret,4))!=0){
return OP_FALSE;
}
@@ -1258,10 +1258,10 @@
char *status_code;
int v1_1_compat;
size_t d;
- /*RFC 2616 Section 6.1 does not say that the tokens in the Status-Line cannot
- be separated by optional LWS, but since it specifically calls out where
+ /*RFC 2616 Section 6.1 does not say if the tokens in the Status-Line can be
+ separated by optional LWS, but since it specifically calls out where
spaces are to be placed and that CR and LF are not allowed except at the
- end, I am assuming this to be true.*/
+ end, we are assuming extra LWS is not allowed.*/
/*We already validated that this starts with "HTTP"*/
OP_ASSERT(op_strncasecmp(_response,"HTTP",4)==0);
next=_response+4;
@@ -1285,7 +1285,7 @@
d--;
}
/*We don't need to parse the version number.
- Any non-zero digit means it's greater than 1.*/
+ Any non-zero digit means it's at least 1.*/
v1_1_compat=d>0;
next+=d;
if(OP_UNLIKELY(*next++!=' '))return NULL;
@@ -1617,7 +1617,7 @@
next=op_http_parse_status_line(NULL,&status_code,_stream->response.buf);
/*According to RFC 2817, "Any successful (2xx) response to a
CONNECT request indicates that the proxy has established a
- connection to the requested host and port.*/
+ connection to the requested host and port."*/
if(OP_UNLIKELY(next==NULL)||OP_UNLIKELY(status_code[0]!='2'))return OP_FALSE;
return 0;
}
--- a/src/internal.h
+++ b/src/internal.h
@@ -152,7 +152,7 @@
struct OggOpusFile{
/*The callbacks used to access the data source.*/
OpusFileCallbacks callbacks;
- /*A FILE *, memory bufer, etc.*/
+ /*A FILE *, memory buffer, etc.*/
void *source;
/*Whether or not we can seek with this data source.*/
int seekable;
@@ -166,7 +166,9 @@
int nserialnos;
/*The capacity of the list of serial numbers from a single link.*/
int cserialnos;
- /*Storage for the list of serial numbers from a single link.*/
+ /*Storage for the list of serial numbers from a single link.
+ This is a scratch buffer used when scanning the BOS pages at the start of
+ each link.*/
ogg_uint32_t *serialnos;
/*This is the current offset of the data processed by the ogg_sync_state.
After a seek, this should be set to the target offset so that we can track
@@ -227,7 +229,7 @@
/*The number of valid samples in the decoded buffer.*/
int od_buffer_size;
/*The type of gain offset to apply.
- One of OP_HEADER_GAIN, OP_TRACK_GAIN, or OP_ABSOLUTE_GAIN.*/
+ One of OP_HEADER_GAIN, OP_ALBUM_GAIN, OP_TRACK_GAIN, or OP_ABSOLUTE_GAIN.*/
int gain_type;
/*The offset to apply to the gain.*/
opus_int32 gain_offset_q8;