Update of /cvsroot/audacity/audacity-src/src/import
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv1465/src/import

Modified Files:
        ImportFFmpeg.cpp 
Log Message:
Hidden ugly reference counting under a rock. Calls to PickFFmpegLibs() and 
DropFFmpegLibs() are equivalents to GetReference. If you don't call them, 
you're using "weak reference" (since object itself is global and shared 
anyways).
Removed unnecessary argument from the constructor.

Index: ImportFFmpeg.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportFFmpeg.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ImportFFmpeg.cpp    14 Jun 2008 20:02:05 -0000      1.13
+++ ImportFFmpeg.cpp    17 Jun 2008 00:40:18 -0000      1.14
@@ -273,10 +273,7 @@
 FFmpegImportFileHandle::FFmpegImportFileHandle(const wxString & name)
 :  ImportFileHandle(name)
 {
-   if (FFmpegLibsInst == NULL)
-      FFmpegLibsInst = new FFmpegLibs(true);
-   else
-      FFmpegLibsInst->refcount++;
+   PickFFmpegLibs();
 
    mStreamInfo = new wxArrayString();
    mFormatContext = NULL;
@@ -721,12 +718,7 @@
       delete mScs[i];
    }
 
-   FFmpegLibsInst->refcount--;
-   if (FFmpegLibsInst->refcount <= 0)
-   {
-      delete FFmpegLibsInst;
-      FFmpegLibsInst = NULL;
-   }
+   DropFFmpegLibs();
 }
 
 #endif //USE_FFMPEG


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to