[xiph-commits] r10705 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Sun Jan 8 15:17:44 PST 2006


Author: j
Date: 2006-01-08 15:17:41 -0800 (Sun, 08 Jan 2006)
New Revision: 10705

Modified:
   trunk/ffmpeg2theora/get_ffmpeg_cvs.sh
   trunk/ffmpeg2theora/theorautils.c
Log:
- make get_ffmpeg_cvs.sh a bit better
- also call ogg_stream_flush on audio stream



Modified: trunk/ffmpeg2theora/get_ffmpeg_cvs.sh
===================================================================
--- trunk/ffmpeg2theora/get_ffmpeg_cvs.sh	2006-01-08 18:26:07 UTC (rev 10704)
+++ trunk/ffmpeg2theora/get_ffmpeg_cvs.sh	2006-01-08 23:17:41 UTC (rev 10705)
@@ -3,6 +3,13 @@
 #optional, if you have the libs installed:
 #extra="--enable-faad --enable-dts --enable-libgsm --enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2"
 
+common="--enable-libogg --enable-theora --enable-a52  --enable-gpl --disable-encoders"
+
+#linux
+options="$common --enable-pthreads $extra"
+
+#mingw32
+uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra"
+
 cvs -z3 -d:pserver:anonymous at cvs.mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg
-cd ffmpeg && ./configure --enable-libogg --enable-theora --enable-a52 --enable-pthreads --enable-gpl --disable-encoders  --disable-muxers $extra && make
-make 
+cd ffmpeg && ./configure $options && make

Modified: trunk/ffmpeg2theora/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/theorautils.c	2006-01-08 18:26:07 UTC (rev 10704)
+++ trunk/ffmpeg2theora/theorautils.c	2006-01-08 23:17:41 UTC (rev 10705)
@@ -327,7 +327,16 @@
         }
       }
       if(!info->video_only && !info->audiopage_valid) {
-        if(ogg_stream_pageout(&info->vo, &og) > 0) {
+        // this way seeking is much better,
+        // not sure if 23 packets  is a good value. it works though
+        int a_next=0;
+        if(info->a_pkg>22 && ogg_stream_flush(&info->vo, &og) > 0) {
+          a_next=1;
+        }
+        else if(ogg_stream_pageout(&info->vo, &og) > 0) {
+          a_next=1;
+        }
+        if(a_next) {
           len = og.header_len + og.body_len;
           if(info->audiopage_buffer_length < len) {
             info->audiopage = realloc(info->audiopage, len);



More information about the commits mailing list