[xiph-commits] r10516 - experimental/j/Elphel333/http

j at svn.xiph.org j at svn.xiph.org
Thu Dec 1 16:13:31 PST 2005


Author: j
Date: 2005-12-01 16:13:30 -0800 (Thu, 01 Dec 2005)
New Revision: 10516

Modified:
   experimental/j/Elphel333/http/TheoraHTTP.c
Log:
dont update last_page_flags more than needed

Modified: experimental/j/Elphel333/http/TheoraHTTP.c
===================================================================
--- experimental/j/Elphel333/http/TheoraHTTP.c	2005-12-01 23:44:43 UTC (rev 10515)
+++ experimental/j/Elphel333/http/TheoraHTTP.c	2005-12-02 00:13:30 UTC (rev 10516)
@@ -305,7 +305,6 @@
 
             frame_header_length =  ((packets[3+frame_type].len+31)>>3)& (~3);
             overlapped_header   =  (packets[3+frame_type].len & 31)?4:0;
-            last_page_flags     =  (ccam_dma_index[nframe+1]==0xffffffff)?4:0;
 
             /* calculated granulepos */
             if (first_frame) {
@@ -323,7 +322,6 @@
 
             //why this check for 1000000?
             if((unsigned)frame_length <1000000) {
-                fprintf(stderr,"ogg_frame_page: frame_length %d\n", frame_length);
                 header_length= ogg_frame_page (&header,       // [1]
                                        last_page_flags,       // [2]
                                        page_size,             // [3]
@@ -346,8 +344,7 @@
                  [5]  frame data length
                  [6]  pointer to array with frame data(bytes)
                 */
-                
-                //FIXME now actually print the ogg page here.
+
                 if (header_length<0) 
                     fprintf(stderr, "ups\n");
 
@@ -364,6 +361,7 @@
                     fprintf(stderr,"error writing output data8 - error = %d (%s)\n",
                             errno,strerror(errno)); 
                 }
+
                 while (frame_length>0) {
                     dp_prev=dp;
                     header_length= ogg_frame_page (&header,             // [1]
@@ -376,17 +374,16 @@
                                         &frame_length,          // [5]
                                         &dp);                   // [6]
         
-            // write to output stream other pages of a frame
-            if ((fw= fwrite_all(output_fd, (char *) &header, header_length))<0) {
-                fprintf(stderr,"error writing output data9 - error = %d (%s)\n",
+                    // write to output stream other pages of a frame
+                    if ((fw= fwrite_all(output_fd, (char *) &header, header_length))<0) {
+                       fprintf(stderr,"error writing output data9 - error = %d (%s)\n",
                                 errno,strerror(errno)); 
-            }
-            if ((fw= fwrite_all(output_fd, dp_prev, (int) (dp-dp_prev)))<0){
-                fprintf(stderr,"error writing output data10 - error = %d (%s)\n",
+                    }
+                    if ((fw= fwrite_all(output_fd, dp_prev, (int) (dp-dp_prev)))<0){
+                        fprintf(stderr,"error writing output data10 - error = %d (%s)\n",
                                 errno,strerror(errno)); 
-            } 
+                    } 
                 }
-                
             }
             frame_start=next_frame_start;
             frame_no++;



More information about the commits mailing list