[xiph-commits] r10558 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Tue Dec 6 20:31:07 PST 2005


Author: j
Date: 2005-12-06 20:31:05 -0800 (Tue, 06 Dec 2005)
New Revision: 10558

Modified:
   trunk/ffmpeg2theora/theorautils.c
Log:
this way seeking is much better
(use ogg_stream_flush instead of ogg_stream_pageout for theora)

also playback now works for longer black parts with illi's ds decoder, 
possibly there is a way to do this better, patches are welcome.



Modified: trunk/ffmpeg2theora/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/theorautils.c	2005-12-07 02:32:28 UTC (rev 10557)
+++ trunk/ffmpeg2theora/theorautils.c	2005-12-07 04:31:05 UTC (rev 10558)
@@ -277,7 +277,12 @@
     while(1) {
       /* Get pages for both streams, if not already present, and if available.*/
       if(!info->audio_only && !info->videopage_valid) {
-        if(ogg_stream_pageout(&info->to, &og) > 0) {
+
+        // flush a page each frame;
+        // this way seeking is much better, possibly there is a way to 
+        // do this better, but for now this works.
+//        if(ogg_stream_pageout(&info->to, &og) > 0) {
+        if(ogg_stream_flush(&info->to, &og) > 0) {
           len = og.header_len + og.body_len;
           if(info->videopage_buffer_length < len) {
             info->videopage = realloc(info->videopage, len);



More information about the commits mailing list