[xiph-cvs] cvs commit: theora/examples dump_video.c

Timothy Terriberry tterribe at xiph.org
Thu Jan 22 12:26:22 PST 2004



tterribe    04/01/22 15:26:22

  Modified:    examples dump_video.c
  Log:
  Fixed a problem where very small streams would not output anything.
  
  Turns out we were checking for EOF before queueing any pages we already had data for after parsing the headers. If we'd already buffered the whole file, then these pages would never get queued, and thus never decoded.

Revision  Changes    Path
1.9       +6 -1      theora/examples/dump_video.c

Index: dump_video.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/dump_video.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dump_video.c	22 Nov 2003 14:53:03 -0000	1.8
+++ dump_video.c	22 Jan 2004 20:26:22 -0000	1.9
@@ -11,7 +11,7 @@
  ********************************************************************
 
   function: example dumpvid application; dumps  Theora streams
-  last mod: $Id: dump_video.c,v 1.8 2003/11/22 14:53:03 tterribe Exp $
+  last mod: $Id: dump_video.c,v 1.9 2004/01/22 20:26:22 tterribe Exp $
 
  ********************************************************************/
 
@@ -282,6 +282,11 @@
   /* on to the main decode loop.*/
 
   stateflag=0; /* playback has not begun */
+  /* queue any remaining pages from data we buffered but that did not
+      contain headers */
+  while(ogg_sync_pageout(&oy,&og)>0){
+    queue_page(&og);
+  }
   while(!got_sigint){
 
     while(theora_p && !videobuf_ready){

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list