[xiph-commits] r18037 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Sat Jul 30 13:04:25 PDT 2011


Author: j
Date: 2011-07-30 13:04:25 -0700 (Sat, 30 Jul 2011)
New Revision: 18037

Modified:
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
init variables

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2011-07-30 19:55:10 UTC (rev 18036)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2011-07-30 20:04:25 UTC (rev 18037)
@@ -528,7 +528,7 @@
     float frame_aspect = 0;
     double fps = 0.0;
     AVRational vstream_fps;
-    int display_width, display_height;
+    int display_width = -1, display_height = -1;
     char *subtitles_enabled = (char*)alloca(this->context->nb_streams);
     char *subtitles_opened = (char*)alloca(this->context->nb_streams);
     int synced = this->start_time == 0.0;
@@ -1292,8 +1292,10 @@
                     ki->gps_denominator = 1;
                 }
                 ki->granule_shift = 32;
-                ki->original_canvas_width = display_width;
-                ki->original_canvas_height = display_height;
+                if (display_width >= 0)
+                    ki->original_canvas_width = display_width;
+                if (display_height >= 0)
+                    ki->original_canvas_height = display_height;
             }
           }
         }



More information about the commits mailing list