[xiph-commits] r9239 - trunk/ffmpeg2theora

j at motherfish-iii.xiph.org j at motherfish-iii.xiph.org
Sun May 8 00:33:51 PDT 2005


Author: j
Date: 2005-05-08 00:33:48 -0700 (Sun, 08 May 2005)
New Revision: 9239

Modified:
   trunk/ffmpeg2theora/ffmpeg2theora.c
   trunk/ffmpeg2theora/theorautils.c
   trunk/ffmpeg2theora/theorautils.h
Log:
add init_info(&info); and make sure some variables are initialized to 0

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2005-05-08 04:49:20 UTC (rev 9238)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2005-05-08 07:33:48 UTC (rev 9239)
@@ -759,11 +759,12 @@
       {"help",0,NULL,'h'},
       {NULL,0,NULL,0}
     };
+
     if (argc == 1){
         print_usage ();
     }
     // set some variables;
-    info.debug=0;
+    init_info(&info);
     theora_comment_init (&info.tc);
     
     while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){

Modified: trunk/ffmpeg2theora/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/theorautils.c	2005-05-08 04:49:20 UTC (rev 9238)
+++ trunk/ffmpeg2theora/theorautils.c	2005-05-08 07:33:48 UTC (rev 9239)
@@ -41,6 +41,15 @@
     return (double)(int)(x + 0.5);
 }
 
+void init_info(theoraframes_info *info) {
+    info->videotime =  0;
+    info->audiotime = 0;
+    info->videoflag = 0;
+    info->audioflag = 0;
+    info->debug = 0;
+}
+
+
 void theoraframes_init (theoraframes_info *info){
     info->audio_bytesout = 0;
     info->video_bytesout = 0;

Modified: trunk/ffmpeg2theora/theorautils.h
===================================================================
--- trunk/ffmpeg2theora/theorautils.h	2005-05-08 04:49:20 UTC (rev 9238)
+++ trunk/ffmpeg2theora/theorautils.h	2005-05-08 07:33:48 UTC (rev 9239)
@@ -124,6 +124,7 @@
 }
 theoraframes_info;
 
+extern void init_info(theoraframes_info *info);
 extern void theoraframes_init (theoraframes_info *info);
 extern int theoraframes_add_video (ff2theora this, theoraframes_info *info, AVFrame *avframe, int e_o_s);
 extern int theoraframes_add_audio (theoraframes_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s);



More information about the commits mailing list