Update of /cvsroot/audacity/audacity-src/src/export
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14321/src/export

Modified Files:
        ExportFFmpeg.cpp 
Log Message:
Fix codec_tag corruption in release versions of Audacity.

Index: ExportFFmpeg.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFFmpeg.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- ExportFFmpeg.cpp    31 Dec 2009 09:16:13 -0000      1.65
+++ ExportFFmpeg.cpp    4 Jan 2010 12:08:23 -0000       1.66
@@ -391,14 +391,13 @@
       mEncAudioCodecCtx->flags2 |= CODEC_FLAG2_BIT_RESERVOIR | 0x0004;
       break;
    case FMT_OTHER:
-      
memcpy(mEncAudioStream->language,gPrefs->Read(wxT("/FileFormats/FFmpegLanguage"),wxT("")).c_str(),4);
+      
strncpy(mEncAudioStream->language,gPrefs->Read(wxT("/FileFormats/FFmpegLanguage"),wxT("")).mb_str(wxConvUTF8),4);
       mEncAudioCodecCtx->sample_rate = 
gPrefs->Read(wxT("/FileFormats/FFmpegSampleRate"),(long)0);
       if (mEncAudioCodecCtx->sample_rate != 0) mSampleRate = 
mEncAudioCodecCtx->sample_rate;
       mEncAudioCodecCtx->bit_rate = 
gPrefs->Read(wxT("/FileFormats/FFmpegBitRate"), (long)0);
-      
memcpy(&mEncAudioCodecCtx->codec_tag,gPrefs->Read(wxT("/FileFormats/FFmpegTag"),wxT("")).c_str(),4);
+      strncpy((char 
*)&mEncAudioCodecCtx->codec_tag,gPrefs->Read(wxT("/FileFormats/FFmpegTag"),wxT("")).mb_str(wxConvUTF8),4);
       mEncAudioCodecCtx->global_quality = 
gPrefs->Read(wxT("/FileFormats/FFmpegQuality"),(long)-99999);
       mEncAudioCodecCtx->cutoff = 
gPrefs->Read(wxT("/FileFormats/FFmpegCutOff"),(long)0);
-      mEncAudioCodecCtx->use_lpc = 
gPrefs->Read(wxT("/FileFormats/FFmpegUseLPC"),true);
       mEncAudioCodecCtx->flags2 = 0;
       if (gPrefs->Read(wxT("/FileFormats/FFmpegBitReservoir"),true)) 
mEncAudioCodecCtx->flags2 |= CODEC_FLAG2_BIT_RESERVOIR;
       if (gPrefs->Read(wxT("/FileFormats/FFmpegVariableBlockLen"),true)) 
mEncAudioCodecCtx->flags2 |= 0x0004; //WMA only?


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to