Update of /cvsroot/audacity/audacity-src/src/export
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16164/src/export

Modified Files:
        ExportFFmpeg.cpp 
Log Message:
FFmpeg exporter: fix av-libs availability not being checked prior to using them.

Index: ExportFFmpeg.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFFmpeg.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- ExportFFmpeg.cpp    3 Feb 2009 18:53:11 -0000       1.50
+++ ExportFFmpeg.cpp    4 Feb 2009 23:38:01 -0000       1.51
@@ -145,7 +145,23 @@
 ExportFFmpeg::ExportFFmpeg()
 :  ExportPlugin()
 {
+   mEncFormatCtx = NULL;                       // libavformat's context for 
our output file
+   mEncFormatDesc = NULL;                      // describes our output file to 
libavformat
+   mEncAudioStream = NULL;                     // the output audio stream (may 
remain NULL)
+   mEncAudioCodecCtx = NULL;           // the encoder for the output audio 
stream
+   mEncAudioEncodedBuf = NULL; // buffer to hold frames encoded by the encoder
+   #define MAX_AUDIO_PACKET_SIZE (128 * 1024)
+   mEncAudioEncodedBufSiz = 4*MAX_AUDIO_PACKET_SIZE;
+   mEncAudioFifoOutBuf = NULL; // buffer to read _out_ of the FIFO into
+   mSampleRate = 0;
+   mSupportsUTF8 = true;
+
    PickFFmpegLibs();
+   if (!FFmpegLibsInst->ValidLibsLoaded())
+   {
+     DropFFmpegLibs();
+     return;
+   }
    int newfmt;
    // Adds export types from the export type list
    for (newfmt = 0; newfmt < FMT_LAST; newfmt++)
@@ -184,17 +200,6 @@
      SetCanMetaData(fmts[newfmt].canmetadata,fmtindex);
      SetDescription(fmts[newfmt].description,fmtindex);
    }
-
-   mEncFormatCtx = NULL;                       // libavformat's context for 
our output file
-   mEncFormatDesc = NULL;                      // describes our output file to 
libavformat
-   mEncAudioStream = NULL;                     // the output audio stream (may 
remain NULL)
-   mEncAudioCodecCtx = NULL;           // the encoder for the output audio 
stream
-   mEncAudioEncodedBuf = NULL; // buffer to hold frames encoded by the encoder
-   #define MAX_AUDIO_PACKET_SIZE (128 * 1024)
-   mEncAudioEncodedBufSiz = 4*MAX_AUDIO_PACKET_SIZE;
-   mEncAudioFifoOutBuf = NULL; // buffer to read _out_ of the FIFO into
-   mSampleRate = 0;
-   mSupportsUTF8 = true;
 }
 
 void ExportFFmpeg::Destroy()


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to