[xiph-cvs] cvs commit: snatch snatch2yuv.c snatchconvert.c
Monty
xiphmont at xiph.org
Fri Feb 22 09:21:35 PST 2002
xiphmont 02/02/22 09:21:35
Modified: . snatch2yuv.c snatchconvert.c
Log:
more new framing fixes. I think we're good for now.
Revision Changes Path
1.5 +10 -4 snatch/snatch2yuv.c
Index: snatch2yuv.c
===================================================================
RCS file: /usr/local/cvsroot/snatch/snatch2yuv.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- snatch2yuv.c 2002/02/22 16:33:09 1.4
+++ snatch2yuv.c 2002/02/22 17:21:34 1.5
@@ -173,14 +173,20 @@
}
if(graph){
- long total=0;
+ long max=0;
int i;
if(noisy)fprintf(stderr,"\n");
for(i=1;i<=60;i++)
- total+=fpsgraph[i];
- for(i=1;i<=60;i++)
- fprintf(stderr,"%3dfps|%*c\n",i,fpsgraph[i]*70/total,'*');
+ if(max<fpsgraph[i])max=fpsgraph[i];
+ if(max)
+ for(i=1;i<=60;i++){
+ int val=(int)(fpsgraph[i]*70/max);
+ if(val)
+ fprintf(stderr,"%3dfps|%*c\n",i,val-1,'*');
+ else
+ fprintf(stderr,"%3dfps|\n",i,val-1,'*');
+ }
}
if(noisy)fprintf(stderr,"\n");
<p><p>1.10 +11 -7 snatch/snatchconvert.c
Index: snatchconvert.c
===================================================================
RCS file: /usr/local/cvsroot/snatch/snatchconvert.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- snatchconvert.c 2002/02/22 16:33:09 1.9
+++ snatchconvert.c 2002/02/22 17:21:34 1.10
@@ -454,7 +454,8 @@
if(!s)return(0);
length=atoi(s);
- if(!read_snatch_frame_helper(f,length,1))return(0);
+ if(!read_snatch_frame_helper(f,length,1))
+ return(0);
if(global_zerotime==0){
global_zerotime=t;
@@ -463,7 +464,8 @@
}
if(t<begin_time)return(length);
- if(t>end_time)return(0);
+ if(t>end_time)
+ return(0);
if(audbuf_zerotime==0){
audbuf_zerotime=t;
@@ -753,7 +755,8 @@
if(!s)return(0);
length=atoi(s);
- if(!read_snatch_frame_helper(f,length,1))return(0);
+ if(!read_snatch_frame_helper(f,length,1))
+ return(0);
if(global_zerotime==0){
global_zerotime=t;
@@ -762,7 +765,8 @@
}
if(t<begin_time)return(length);
- if(t>end_time)return(0);
+ if(t>end_time)
+ return(0);
if(last_t!=-1){
double del_t=t-last_t;
@@ -983,11 +987,11 @@
if(process_audio && !audio_p){
fprintf(stderr,"No audio in this stream\n");
- return(1);
+ exit(1);
}
if(process_video && !video_p){
fprintf(stderr,"No video in this stream\n");
- return(1);
+ exit(1);
}
header=1;
@@ -999,7 +1003,7 @@
if(!drain){
int ret=read_snatch_frame(in,process_audio,process_video);
- if(ret==0 && feof(in))drain=1;
+ if(ret==0)drain=1;
}
if(audio_p && video_p){
<p><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