[xiph-commits] r14992 - in trunk/ffmpeg2theora: . src

j at svn.xiph.org j at svn.xiph.org
Tue Jun 3 08:58:29 PDT 2008


Author: j
Date: 2008-06-03 08:58:28 -0700 (Tue, 03 Jun 2008)
New Revision: 14992

Modified:
   trunk/ffmpeg2theora/
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
   trunk/ffmpeg2theora/src/subtitles.c
   trunk/ffmpeg2theora/src/subtitles.h
Log:
work on compiler warnings


Property changes on: trunk/ffmpeg2theora
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2008-05-29 12:29:40.973000050 +0200
committer: j
properties: 
	branch-nick: ffmpeg2theora

   + timestamp: 2008-05-29 13:14:05.869999886 +0200
committer: j
properties: 
	branch-nick: ffmpeg2theora

Name: bzr:revision-id:v3-single1-dHJ1bmsvZmZtcGVnMnRoZW9yYQ..
   - 191 j-20080517230830-he5x8v2m8yrfiw35
192 j-20080518224037-pkmoctzf4qce7tog
193 j-20080518224409-6hbfp3k2ssn6egqa
194 j-20080520111939-dhi52qwbqe7a47cu
195 j-20080523092252-gj9k9db0s67vl7dw
196 j-20080523092420-l0850yrq1qkgz9t0
197 j-20080523093057-l5g0ezzy5geu0pey
198 j-20080523094343-kcno1dm2e1lr38q4
199 j-20080523163006-kjl6ewea5sxawmq2
200 j-20080523165904-l2vm52qae0hlqkhp
201 j-20080523175432-2ed953iktnl8c7cr
202 j-20080525100939-7oja8pk08v9fquiw
203 j-20080526111321-nhzaqh6ivzn0vs7b
204 j-20080527100851-2v5eyxxrq1riqi50
205 j-20080527101341-9ynbgth2b15jw792
206 j-20080527205556-19tffvfrxgt3khld
207 j-20080527205840-zeestdde3v1zks9k
208 j-20080527210129-e73y56uwmzbcid00
209 j-20080527211813-5ll680ed1q4byp16
210 j-20080528102006-aeippim0tn70mz3f
211 j-20080528104907-40kiidjojvta8j61
212 j-20080528111329-vkqbt7xkat2o9h4z
213 j-20080529102940-q9xdwm5v9espzomv

   + 191 j-20080517230830-he5x8v2m8yrfiw35
192 j-20080518224037-pkmoctzf4qce7tog
193 j-20080518224409-6hbfp3k2ssn6egqa
194 j-20080520111939-dhi52qwbqe7a47cu
195 j-20080523092252-gj9k9db0s67vl7dw
196 j-20080523092420-l0850yrq1qkgz9t0
197 j-20080523093057-l5g0ezzy5geu0pey
198 j-20080523094343-kcno1dm2e1lr38q4
199 j-20080523163006-kjl6ewea5sxawmq2
200 j-20080523165904-l2vm52qae0hlqkhp
201 j-20080523175432-2ed953iktnl8c7cr
202 j-20080525100939-7oja8pk08v9fquiw
203 j-20080526111321-nhzaqh6ivzn0vs7b
204 j-20080527100851-2v5eyxxrq1riqi50
205 j-20080527101341-9ynbgth2b15jw792
206 j-20080527205556-19tffvfrxgt3khld
207 j-20080527205840-zeestdde3v1zks9k
208 j-20080527210129-e73y56uwmzbcid00
209 j-20080527211813-5ll680ed1q4byp16
210 j-20080528102006-aeippim0tn70mz3f
211 j-20080528104907-40kiidjojvta8j61
212 j-20080528111329-vkqbt7xkat2o9h4z
213 j-20080529102940-q9xdwm5v9espzomv
214 j-20080529111405-nmh99aon1kmh22qm


Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2008-06-03 07:15:08 UTC (rev 14991)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2008-06-03 15:58:28 UTC (rev 14992)
@@ -29,6 +29,7 @@
 
 #include "libavformat/avformat.h"
 #include "libavdevice/avdevice.h"
+#include "libavformat/framehook.h"
 #include "libswscale/swscale.h"
 #include "libpostproc/postprocess.h"
 
@@ -183,8 +184,6 @@
 
         this->y_lut_used = 0;
         this->uv_lut_used = 0;
-        this->y_lut[256];
-        this->uv_lut[256];
     }
     return this;
 }
@@ -296,7 +295,7 @@
     AVCodec *vcodec = NULL;
     pp_mode_t *ppMode = NULL;
     pp_context_t *ppContext = NULL;
-    float frame_aspect;
+    float frame_aspect = 0;
     double fps = 0.0;
 
     if(this->audiostream >= 0 && this->context->nb_streams > this->audiostream) {
@@ -604,10 +603,10 @@
         uint8_t *ptr;
         int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
         int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
-        int16_t *audio_p;
+        int16_t *audio_p=NULL;
         int no_frames;
 
-        double framerate_add;
+        double framerate_add = 0;
         double framerate_tmpcount = 0;
 
         if(this->video_index >= 0)
@@ -760,7 +759,7 @@
 
             ptr = pkt.data;
             len = pkt.size;
-            if (e_o_s && !info.audio_only || (ret >= 0 && pkt.stream_index == this->video_index)){
+            if ((e_o_s && !info.audio_only) || (ret >= 0 && pkt.stream_index == this->video_index)){
                 if(len == 0 && !first && !e_o_s){
                     fprintf (stderr, "no frame available\n");
                 }
@@ -832,6 +831,7 @@
                                 output=output_tmp;
                             }
                             // now output
+
                             if(ppMode)
                                 pp_postprocess(output->data, output->linesize,
                                                output->data, output->linesize,
@@ -839,7 +839,7 @@
                                                output->qscale_table, output->qstride,
                                                ppMode, ppContext, this->pix_fmt);
                             if(this->vhook)
-                                frame_hook_process((AVPicture *)output, this->pix_fmt, venc->width,venc->height);
+                                frame_hook_process((AVPicture *)output, this->pix_fmt, venc->width,venc->height, 0);
 
                             if (this->frame_topBand || this->frame_leftBand) {
                                 if (av_picture_crop((AVPicture *)output_tmp, (AVPicture *)output,
@@ -882,7 +882,7 @@
                 }
 
             }
-            if(e_o_s && !info.video_only
+            if((e_o_s && !info.video_only)
                      || (ret >= 0 && pkt.stream_index == this->audio_index)){
                 this->pts_offset = (double) pkt.pts / AV_TIME_BASE -
                     (double) this->sample_count / this->sample_rate;
@@ -1735,7 +1735,7 @@
                 info.outfile = fopen(outputfile_name,"wb");
 #endif
                 if(info.frontend) {
-                  fprintf(stderr, "\nf2t ;duration: %d;\n", convert->context->duration / AV_TIME_BASE);
+                  fprintf(stderr, "\nf2t ;duration: %d;\n", (int)(convert->context->duration / AV_TIME_BASE));
                 }
                 else {
                   dump_format (convert->context, 0,inputfile_name, 0);

Modified: trunk/ffmpeg2theora/src/subtitles.c
===================================================================
--- trunk/ffmpeg2theora/src/subtitles.c	2008-06-03 07:15:08 UTC (rev 14991)
+++ trunk/ffmpeg2theora/src/subtitles.c	2008-06-03 15:58:28 UTC (rev 14992)
@@ -40,7 +40,7 @@
 /**
   * adds a new kate stream structure
   */
-static void add_kate_stream(ff2theora this){
+void add_kate_stream(ff2theora this){
     ff2theora_kate_stream *ks;
     this->kate_streams=(ff2theora_kate_stream*)realloc(this->kate_streams,(this->n_kate_streams+1)*sizeof(ff2theora_kate_stream));
     ks=&this->kate_streams[this->n_kate_streams++];
@@ -111,7 +111,7 @@
   fprintf(stderr, "  " SUPPORTED_ENCODINGS "\n");
 }
 
-static char *fgets2(char *s,size_t sz,FILE *f)
+char *fgets2(char *s,size_t sz,FILE *f)
 {
     char *ret = fgets(s, sz, f);
     /* fixup DOS newline character */
@@ -120,13 +120,13 @@
     return ret;
 }
 
-static double hmsms2s(int h,int m,int s,int ms)
+double hmsms2s(int h,int m,int s,int ms)
 {
     return h*3600+m*60+s+ms/1000.0;
 }
 
 /* very simple implementation when no iconv */
-static void convert_subtitle_to_utf8(F2T_ENCODING encoding,unsigned char *text)
+void convert_subtitle_to_utf8(F2T_ENCODING encoding,unsigned char *text)
 {
   size_t nbytes;
   unsigned char *ptr,*newtext;
@@ -183,7 +183,8 @@
     int id;
     static char text[4096];
     int h0,m0,s0,ms0,h1,m1,s1,ms1;
-    double t0,t1;
+    double t0=0.0;
+    double t1=0.0;
     static char str[4096];
     int warned=0;
 

Modified: trunk/ffmpeg2theora/src/subtitles.h
===================================================================
--- trunk/ffmpeg2theora/src/subtitles.h	2008-06-03 07:15:08 UTC (rev 14991)
+++ trunk/ffmpeg2theora/src/subtitles.h	2008-06-03 15:58:28 UTC (rev 14992)
@@ -15,7 +15,7 @@
 
 #define SUPPORTED_ENCODINGS "utf-8, utf8, iso-8859-1, latin1"
 
-static void add_kate_stream(ff2theora this);
+extern void add_kate_stream(ff2theora this);
 extern int load_subtitles(ff2theora_kate_stream *this);
 extern void free_subtitles(ff2theora this);
 
@@ -25,8 +25,8 @@
 extern void set_subtitles_encoding(ff2theora this,F2T_ENCODING encoding);
 extern void report_unknown_subtitle_encoding(const char *name);
 
-static char *fgets2(char *s,size_t sz,FILE *f);
-static double hmsms2s(int h,int m,int s,int ms);
-static void convert_subtitle_to_utf8(F2T_ENCODING encoding,unsigned char *text);
+extern char *fgets2(char *s,size_t sz,FILE *f);
+extern double hmsms2s(int h,int m,int s,int ms);
+extern void convert_subtitle_to_utf8(F2T_ENCODING encoding,unsigned char *text);
 #endif
 



More information about the commits mailing list