[NUT-devel] [nut]: r528 - in src/trunk/nututils: demux_ogg.c framer_mp3.c framer_mpeg4.c framer_vorbis.c nutindex.c nutmerge.h nutparse.c

diego subversion at mplayerhq.hu
Fri Feb 1 15:21:28 CET 2008


Author: diego
Date: Fri Feb  1 15:21:27 2008
New Revision: 528

Log:
comment spelling/wording


Modified:
   src/trunk/nututils/demux_ogg.c
   src/trunk/nututils/framer_mp3.c
   src/trunk/nututils/framer_mpeg4.c
   src/trunk/nututils/framer_vorbis.c
   src/trunk/nututils/nutindex.c
   src/trunk/nututils/nutmerge.h
   src/trunk/nututils/nutparse.c

Modified: src/trunk/nututils/demux_ogg.c
==============================================================================
--- src/trunk/nututils/demux_ogg.c	(original)
+++ src/trunk/nututils/demux_ogg.c	Fri Feb  1 15:21:27 2008
@@ -12,7 +12,7 @@ typedef struct ogg_stream_s ogg_stream_t
 
 struct ogg_stream_s {
 	int serial;
-	int leftover; // buffer for "next page" nonsense. always re-alloced
+	int leftover; // buffer for "next page" nonsense. always reallocated
 	uint8_t * leftover_buf;
 };
 
@@ -21,7 +21,7 @@ struct demuxer_priv_s {
 	ogg_stream_t * os;
 	stream_t * s;
 	int nstreams;
-	int stream_count; // when nutmerge_streams was handed to api...
+	int stream_count; // when nutmerge_streams was handed to the API ...
 };
 
 static struct { enum nutmerge_codecs id; uint8_t * magic; int magic_len; } codecs[] = {
@@ -77,7 +77,7 @@ static int read_page(demuxer_priv_t * og
 			p.buf = malloc(len);
 			p.p.len = len;
 			p.p.stream = *stream;
-			p.p.flags = p.p.pts = p.p.next_pts = 0; // ogg sucks
+			p.p.flags = p.p.pts = p.p.next_pts = 0; // Ogg sucks
 			memcpy(p.buf, os->leftover_buf, os->leftover);
 			FREAD(ogg->in, len - os->leftover, p.buf + os->leftover);
 			push_packet(&ogg->s[*stream], &p);

Modified: src/trunk/nututils/framer_mp3.c
==============================================================================
--- src/trunk/nututils/framer_mp3.c	(original)
+++ src/trunk/nututils/framer_mp3.c	Fri Feb  1 15:21:27 2008
@@ -39,7 +39,7 @@ static int get_packet(framer_priv_t * mp
 	if (layer==4) return err_mp3_bad_packet;
 	if (freq==3)  return err_mp3_bad_packet;
 
-	//>>19&0x3
+	//>>19 & 0x3
 	if (newhead & (1<<20)) { // MPEG 1.0 (lsf==0) or MPEG 2.0 (lsf==1)
 	  lsf = (newhead & (1<<19)) ? 0 : 1;
 	  if (lsf) freq += 3;

Modified: src/trunk/nututils/framer_mpeg4.c
==============================================================================
--- src/trunk/nututils/framer_mpeg4.c	(original)
+++ src/trunk/nututils/framer_mpeg4.c	Fri Feb  1 15:21:27 2008
@@ -37,15 +37,15 @@ static int get_packet(framer_priv_t * mc
 	if (!(p->p.flags & NUT_FLAG_KEY) ^ (type != 0)) printf("Error detected stream %d frame %d\n", p->p.stream, (int)p->p.pts);
 	p->p.flags |= (type == 0 ? NUT_FLAG_KEY : 0);
 
-	if (type == 2) { p->p.pts--; return 0; } // B frame, simple
+	if (type == 2) { p->p.pts--; return 0; } // B-frame, simple
 	if (type == 3) printf("S-Frame %d\n", (int)p->p.pts);
 
-	// I, P or S, needs forward B frame check
+	// I, P or S, needs forward B-frame check
 
 	while ((err = peek_stream_packet(mc->stream, &tmp_p, n++)) != -1) {
 		if (err) return err;
 		CHECK(find_frame_type(tmp_p.p.len, tmp_p.buf, &type));
-		if (type != 2) break; // not b frame, we're done.
+		if (type != 2) break; // Not a B-frame, we're done.
 		p->p.pts++;
 	}
 

Modified: src/trunk/nututils/framer_vorbis.c
==============================================================================
--- src/trunk/nututils/framer_vorbis.c	(original)
+++ src/trunk/nututils/framer_vorbis.c	Fri Feb  1 15:21:27 2008
@@ -73,7 +73,7 @@ static int setup_headers(framer_priv_t *
 	uint8_t * p;
 	packet_t pd[3];
 
-	// need first 3 packets - TODO - support work directly from good codec_specific instead of ogg crap
+	// need first 3 packets - TODO - support working directly from good codec_specific instead of Ogg crap
 	CHECK(get_stream_packet(vc->stream, &pd[0])); pd_read++;
 	CHECK(get_stream_packet(vc->stream, &pd[1])); pd_read++;
 	CHECK(get_stream_packet(vc->stream, &pd[2])); pd_read++;
@@ -309,7 +309,7 @@ static int get_packet(framer_priv_t * vc
 	if (vc->pts == -1) vc->pts = -MIN(prevbs, mybs)/2; // negative pts for first frame
 
 	vc->pts += MIN(prevbs, mybs)/2; // overlapped with prev
-	vc->pts += (mybs - prevbs)/4; // self contained
+	vc->pts += (mybs - prevbs)/4; // self-contained
 	vc->pts += (mybs - nextbs)/4;
 
 	p->p.pts = last_pts;

Modified: src/trunk/nututils/nutindex.c
==============================================================================
--- src/trunk/nututils/nutindex.c	(original)
+++ src/trunk/nututils/nutindex.c	Fri Feb  1 15:21:27 2008
@@ -40,7 +40,7 @@ typedef struct {
         int is_mem;
 	uint8_t * buf;
 	uint8_t * buf_ptr;
-	int write_len; // memory allocated
+	int write_len; // allocated memory
 	off_t file_pos;
 	FILE * out;
 } output_buffer_t;
@@ -130,7 +130,7 @@ typedef struct {
 	FILE * in;
 	uint8_t * buf;
 	uint8_t * buf_ptr;
-	int write_len; // memory allocated
+	int write_len; // allocated memory
 	int read_len;  // data in memory
 	off_t file_pos;
 	off_t filesize;
@@ -313,7 +313,7 @@ static int find_copy_index(input_buffer_
 
 	forward_ptr += new_idx_len-idx_len;
 
-	idx_len = (in->filesize - 12) - bctello(in); // from where we are, until the index_ptr and checksum, copy everything
+	idx_len = (in->filesize - 12) - bctello(in); // copy everything from where we are until the index_ptr and checksum
 	if (get_data(in, idx_len, out->buf_ptr)) return 1;
 	out->buf_ptr += idx_len;
 
@@ -333,7 +333,7 @@ int main(int argc, char * argv[]) {
 		fprintf(stderr, "%s <input-nut-file> <output-nut-file>\n", argv[0]);
 		return 1;
 	}
-	printf("Note! This program produces less error resiliant files by moving the main headers!\n");
+	printf("Note! This program produces less error resilient files by moving the main headers!\n");
 
 	in = new_input_buffer(&iin, fin);
 	out = new_output_buffer(&oout, fout);

Modified: src/trunk/nututils/nutmerge.h
==============================================================================
--- src/trunk/nututils/nutmerge.h	(original)
+++ src/trunk/nututils/nutmerge.h	Fri Feb  1 15:21:27 2008
@@ -25,7 +25,7 @@ enum nutmerge_codecs {
 
 typedef struct {
 	nut_packet_t p;
-	uint8_t * buf; // the demuxer mallocs this, nutmerge (or framer) evantually frees it
+	uint8_t * buf; // the demuxer mallocs this, nutmerge (or framer) eventually frees it
 } packet_t;
 
 typedef struct {

Modified: src/trunk/nututils/nutparse.c
==============================================================================
--- src/trunk/nututils/nutparse.c	(original)
+++ src/trunk/nututils/nutparse.c	Fri Feb  1 15:21:27 2008
@@ -774,7 +774,7 @@ static void parse_frame(int frame_type)
 	}
 	printf(" pts: %"PRIi64" (%.3lf s)", streams[stream_id].last_pts,
 	       time_in_s(streams[stream_id].last_pts, streams[stream_id].time_base_id));
-	/* TODO: check pts monotoneness and other pts/dts constraints */
+	/* TODO: check pts monotonicity and other pts/dts constraints */
 	printf(" data_size: %"PRIu64"\n", data_size_msb * frame_types[frame_type].data_size_mul + frame_types[frame_type].data_size_lsb);
 	if ((frame_flags & (FLAG_KEY | FLAG_EOR)) == FLAG_EOR)
 		error("eor frames must be key frames");



More information about the NUT-devel mailing list