[xiph-cvs] cvs commit: postfish input.c output.c version.h
Monty
xiphmont at xiph.org
Thu Oct 16 13:39:37 PDT 2003
xiphmont 03/10/16 16:39:37
Modified: . input.c output.c version.h
Log:
Fix EOF boundary cases
Revision Changes Path
1.7 +3 -2 postfish/input.c
Index: input.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/input.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- input.c 16 Oct 2003 19:28:47 -0000 1.6
+++ input.c 16 Oct 2003 20:39:36 -0000 1.7
@@ -432,20 +432,21 @@
memset(peak,0,sizeof(*peak)*(out.channels+2));
pthread_mutex_lock(&master_mutex);
+ out.samples=0;
/* the non-streaming case */
if(!loop_active &&
cursor>=current_file_entry->end &&
current_file_entry->end!=-1){
pthread_mutex_unlock(&master_mutex);
- return NULL; /* EOF */
+ return &out; /* EOF */
}
/* the streaming case */
if(feof(current_file_entry->f) &&
current_file_entry_number+1>=file_entries){
pthread_mutex_unlock(&master_mutex);
- return NULL;
+ return &out;
}
pthread_mutex_unlock(&master_mutex);
<p><p>1.6 +2 -1 postfish/output.c
Index: output.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/output.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- output.c 16 Oct 2003 19:28:47 -0000 1.5
+++ output.c 16 Oct 2003 20:39:36 -0000 1.6
@@ -183,7 +183,8 @@
/* inform Lord Vader his shuttle is ready */
write(eventpipe[1],"",1);
- }
+ }else
+ break; /* eof */
}
if(playback_fd){
<p><p>1.9 +2 -2 postfish/version.h
Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- version.h 16 Oct 2003 19:28:47 -0000 1.8
+++ version.h 16 Oct 2003 20:39:36 -0000 1.9
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.8 2003/10/16 19:28:47 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Thu Oct 16 02:30:55 EDT 2003] */
+#define VERSION "$Id: version.h,v 1.9 2003/10/16 20:39:36 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Thu Oct 16 16:34:29 EDT 2003] */
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list