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

j at svn.xiph.org j at svn.xiph.org
Tue May 27 03:25:03 PDT 2008


Author: j
Date: 2008-05-27 03:25:03 -0700 (Tue, 27 May 2008)
New Revision: 14965

Modified:
   trunk/ffmpeg2theora/
   trunk/ffmpeg2theora/src/theorautils.c
Log:
whitespace


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

   + timestamp: 2008-05-27 12:13:41.647000074 +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

   + 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


Modified: trunk/ffmpeg2theora/src/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/src/theorautils.c	2008-05-27 10:24:48 UTC (rev 14964)
+++ trunk/ffmpeg2theora/src/theorautils.c	2008-05-27 10:25:03 UTC (rev 14965)
@@ -35,7 +35,6 @@
 #include "theorautils.h"
 
 
-
 static double rint(double x)
 {
   if (x < 0.0)
@@ -253,11 +252,11 @@
         theora_encode_init (&info->td, &info->ti);
 
         if(info->speed_level >= 0) {
-          int max_speed_level;
-          theora_control(&info->td, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_level, sizeof(int));
-          if(info->speed_level > max_speed_level)
+            int max_speed_level;
+            theora_control(&info->td, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_level, sizeof(int));
+            if(info->speed_level > max_speed_level)
             info->speed_level = max_speed_level;
-          theora_control(&info->td, TH_ENCCTL_SET_SPLEVEL, &info->speed_level, sizeof(int));
+            theora_control(&info->td, TH_ENCCTL_SET_SPLEVEL, &info->speed_level, sizeof(int));
         }
     }
     /* init theora done */
@@ -308,9 +307,9 @@
     /* first packet should be skeleton fishead packet, if skeleton is used */
 
     if (info->with_skeleton) {
-    ogg_stream_init (&info->so, rand());
-    add_fishead_packet (info);
-    if (ogg_stream_pageout (&info->so, &og) != 1){
+        ogg_stream_init (&info->so, rand());
+        add_fishead_packet (info);
+        if (ogg_stream_pageout (&info->so, &og) != 1){
             fprintf (stderr, "Internal Ogg library error.\n");
             exit (1);
         }
@@ -392,20 +391,20 @@
 
     /* output the appropriate fisbone packets */
     if (info->with_skeleton) {
-    add_fisbone_packet (info);
-    while (1) {
-        int result = ogg_stream_flush (&info->so, &og);
-            if (result < 0){
-            /* can't get here */
-            fprintf (stderr, "Internal Ogg library error.\n");
-        exit (1);
-            }
-        if (result == 0)
-            break;
-            fwrite (og.header, 1, og.header_len, info->outfile);
-        fwrite (og.body, 1, og.body_len, info->outfile);
+        add_fisbone_packet (info);
+        while (1) {
+            int result = ogg_stream_flush (&info->so, &og);
+                if (result < 0){
+                /* can't get here */
+                fprintf (stderr, "Internal Ogg library error.\n");
+            exit (1);
+                }
+            if (result == 0)
+                break;
+                fwrite (og.header, 1, og.header_len, info->outfile);
+            fwrite (og.body, 1, og.body_len, info->outfile);
+        }
     }
-    }
 
     if (!info->audio_only) {
     theora_info_clear(&info->ti);
@@ -458,17 +457,17 @@
     }
 
     if (info->with_skeleton) {
-    int result;
+        int result;
 
-    /* build and add the e_o_s packet */
-    memset (&op, 0, sizeof (op));
-        op.b_o_s = 0;
-    op.e_o_s = 1; /* its the e_o_s packet */
-        op.granulepos = 0;
-    op.bytes = 0; /* e_o_s packet is an empty packet */
-        ogg_stream_packetin (&info->so, &op);
+        /* build and add the e_o_s packet */
+        memset (&op, 0, sizeof (op));
+            op.b_o_s = 0;
+        op.e_o_s = 1; /* its the e_o_s packet */
+            op.granulepos = 0;
+        op.bytes = 0; /* e_o_s packet is an empty packet */
+            ogg_stream_packetin (&info->so, &op);
 
-    result = ogg_stream_flush (&info->so, &og);
+        result = ogg_stream_flush (&info->so, &og);
         if (result < 0){
             /* can't get here */
             fprintf (stderr, "Internal Ogg library error.\n");
@@ -491,8 +490,8 @@
     ogg_packet op;
     theora_encode_YUVin (&info->td, yuv);
     while(theora_encode_packetout (&info->td, e_o_s, &op)) {
-      ogg_stream_packetin (&info->to, &op);
-      info->v_pkg++;
+        ogg_stream_packetin (&info->to, &op);
+        info->v_pkg++;
     }
 }
 
@@ -603,14 +602,14 @@
   double remaining = 0;
   double to_encode, time_so_far;
 
-  if(info->duration != -1 && timebase > 0) {
-    time_so_far = time(NULL) - info->start_time;
-    to_encode = info->duration - timebase;
-    if(to_encode > 0) {
-      remaining = (time_so_far / timebase) * to_encode;
+    if(info->duration != -1 && timebase > 0) {
+        time_so_far = time(NULL) - info->start_time;
+        to_encode = info->duration - timebase;
+        if(to_encode > 0) {
+            remaining = (time_so_far / timebase) * to_encode;
+        }
     }
-  }
-  return remaining;
+    return remaining;
 }
 
 static void print_stats(oggmux_info *info, double timebase){
@@ -920,9 +919,9 @@
         fclose (info->outfile);
 
     if(info->videopage)
-      free(info->videopage);
+        free(info->videopage);
     if(info->audiopage)
-      free(info->audiopage);
+        free(info->audiopage);
 
     for (n=0; n<info->n_kate_streams; ++n) {
         if(info->kate_streams[n].katepage)



More information about the commits mailing list