[xiph-commits] r9616 - trunk/ffmpeg2theora
j at svn.xiph.org
j at svn.xiph.org
Sun Jul 24 04:46:00 PDT 2005
Author: j
Date: 2005-07-24 04:45:55 -0700 (Sun, 24 Jul 2005)
New Revision: 9616
Modified:
trunk/ffmpeg2theora/theorautils.c
trunk/ffmpeg2theora/theorautils.h
Log:
remove some warnings, and make some variables local
Modified: trunk/ffmpeg2theora/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/theorautils.c 2005-07-24 11:44:51 UTC (rev 9615)
+++ trunk/ffmpeg2theora/theorautils.c 2005-07-24 11:45:55 UTC (rev 9616)
@@ -192,8 +192,9 @@
}
theora_encode_YUVin (&info->td, &yuv);
- theora_encode_packetout (&info->td, e_o_s, &info->op);
- ogg_stream_packetin (&info->to, &info->op);
+ while(theora_encode_packetout (&info->td, e_o_s, &info->op)) {
+ ogg_stream_packetin (&info->to, &info->op);
+ }
info->videoflag=1;
return 0;
}
@@ -272,25 +273,25 @@
/* flush out the ogg pages to info->outfile */
int flushloop=1;
+ ogg_page videopage;
+ ogg_page audiopage;
while(flushloop){
int video = -1;
flushloop=0;
- //some debuging
- //fprintf(stderr,"\ndiff: %f\n",info->audiotime-info->videotime);
while(!info->audio_only && (e_o_s ||
((info->videotime <= info->audiotime || info->video_only) && info->videoflag == 1))){
info->videoflag = 0;
- while(ogg_stream_pageout (&info->to, &info->videopage) > 0){
+ while(ogg_stream_pageout (&info->to, &videopage) > 0){
info->videotime =
- theora_granule_time (&info->td,ogg_page_granulepos(&info->videopage));
+ theora_granule_time (&info->td,ogg_page_granulepos(&videopage));
/* flush a video page */
info->video_bytesout +=
- fwrite (info->videopage.header, 1,info->videopage.header_len, info->outfile);
+ fwrite (videopage.header, 1,videopage.header_len, info->outfile);
info->video_bytesout +=
- fwrite (info->videopage.body, 1,info->videopage.body_len, info->outfile);
+ fwrite (videopage.body, 1,videopage.body_len, info->outfile);
info->vkbps = rint (info->video_bytesout * 8. / info->videotime * .001);
@@ -307,14 +308,14 @@
((info->audiotime < info->videotime || info->audio_only) && info->audioflag==1))){
info->audioflag = 0;
- while(ogg_stream_pageout (&info->vo, &info->audiopage) > 0){
+ while(ogg_stream_pageout (&info->vo, &audiopage) > 0){
/* flush an audio page */
info->audiotime=
- vorbis_granule_time (&info->vd,ogg_page_granulepos(&info->audiopage));
+ vorbis_granule_time (&info->vd,ogg_page_granulepos(&audiopage));
info->audio_bytesout +=
- fwrite (info->audiopage.header, 1,info->audiopage.header_len, info->outfile);
+ fwrite (audiopage.header, 1,audiopage.header_len, info->outfile);
info->audio_bytesout +=
- fwrite (info->audiopage.body, 1,info->audiopage.body_len, info->outfile);
+ fwrite (audiopage.body, 1,audiopage.body_len, info->outfile);
info->akbps = rint (info->audio_bytesout * 8. / info->audiotime * .001);
print_stats(info, info->audiotime);
Modified: trunk/ffmpeg2theora/theorautils.h
===================================================================
--- trunk/ffmpeg2theora/theorautils.h 2005-07-24 11:44:51 UTC (rev 9615)
+++ trunk/ffmpeg2theora/theorautils.h 2005-07-24 11:45:55 UTC (rev 9616)
@@ -43,8 +43,8 @@
double fps;
ImgReSampleContext *img_resample_ctx; /* for image resampling/resizing */
ReSampleContext *audio_resample_ctx;
- ogg_uint32_t aspect_numerator;
- ogg_uint32_t aspect_denominator;
+ ogg_int32_t aspect_numerator;
+ ogg_int32_t aspect_denominator;
double frame_aspect;
int video_quality;
@@ -93,8 +93,6 @@
double fps;
double start;
double end;
- ogg_page videopage;
- ogg_page audiopage;
int audioflag;
int videoflag;
double audiotime;
More information about the commits
mailing list