[xiph-commits] r9364 - trunk/ffmpeg2theora

j at motherfish-iii.xiph.org j at motherfish-iii.xiph.org
Sun Jun 5 09:57:04 PDT 2005


Author: j
Date: 2005-06-05 09:57:01 -0700 (Sun, 05 Jun 2005)
New Revision: 9364

Modified:
   trunk/ffmpeg2theora/INSTALL
   trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
make audiostream also work

Modified: trunk/ffmpeg2theora/INSTALL
===================================================================
--- trunk/ffmpeg2theora/INSTALL	2005-06-05 11:04:35 UTC (rev 9363)
+++ trunk/ffmpeg2theora/INSTALL	2005-06-05 16:57:01 UTC (rev 9364)
@@ -4,7 +4,7 @@
 - the latest version of libtheora ( http://www.theora.org/files )
 - ffmpeg 0.4.9-pre1 or cvs ( http://ffmpeg.sf.net ) / by running ./get_ffmpeg_cvs.sh
   configure it with i.e.
-  ./configure --enable-faad --enable-vorbis --disable-mp3lame --enable-pp --enable-a52  --enable-dts --enable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-theora --enable-ogg
+  ./configure --enable-faad --enable-vorbis --disable-mp3lame --enable-pp --enable-a52  --enable-dts --enable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-libogg --enable-vorbis --enable-theora
 
 now run:
 ./configure [--with-ffmpegprefix=/path/to/ffmpeg_src]
@@ -17,7 +17,7 @@
  you need to crosscompiled libvorbis,libogg,libtheora
 
  you need ffmpeg, to build it with other crosscompiled libs in /usr/local/win32:
- ./configure --prefix=/usr/local/win32/build  --enable-vorbis --disable-mp3lame --enable-pp --enable-a52  --disable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-mingw32  --cc=i586-mingw32msvc-gcc
+ ./configure --prefix=/usr/local/win32/build  --enable-libogg --enable-vorbis --enable-theora --disable-mp3lame --enable-pp --enable-a52  --disable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-mingw32  --cc=i586-mingw32msvc-gcc
  make
 
  to build ffmpeg2theora

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2005-06-05 11:04:35 UTC (rev 9363)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2005-06-05 16:57:01 UTC (rev 9364)
@@ -125,10 +125,13 @@
     float frame_aspect;
     double fps = 0.0;
     
-    if(this->context->nb_streams > this->audiostream >= 0) {
+    
+    
+    if(this->audiostream >= 0 && this->context->nb_streams > this->audiostream) {
         AVCodecContext *enc = &this->context->streams[this->audiostream]->codec;
         if (enc->codec_type == CODEC_TYPE_AUDIO) {
             this->audio_index = this->audiostream;
+            fprintf(stderr,"  Using stream #0.%d as audio input\n",this->audio_index);
         }
         else {
             fprintf(stderr,"  The selected stream is not audio, falling back to automatic selection\n");
@@ -852,7 +855,7 @@
                     inputfps_flag=0;
                 }
                 if (audiostream_flag){
-                    convert->audiostream=1;
+                    convert->audiostream=atoi(optarg);;
                     audiostream_flag=0;
                 }
                 /* metadata */



More information about the commits mailing list