Revision: 18718
http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18718&view=rev
Author: csoutheren
Date: 2007-10-21 22:34:22 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
Fix problem with choosing non-symmetric codecs in some cases
Modified Paths:
--------------
opal/trunk/src/opal/connection.cxx
Modified: opal/trunk/src/opal/connection.cxx
===================================================================
--- opal/trunk/src/opal/connection.cxx 2007-10-22 04:52:38 UTC (rev 18717)
+++ opal/trunk/src/opal/connection.cxx 2007-10-22 05:34:22 UTC (rev 18718)
@@ -903,12 +903,20 @@
return TRUE;
}
- PTRACE(3, "OpalCon\tOpenSourceMediaStream for session " << sessionID << " on " << *this);
+ // see if sink stream already opened, so we can ensure symmetric codecs
+ OpalMediaFormatList toFormats = mediaFormats;
+ {
+ OpalMediaStream * sink = GetMediaStream(sessionID, FALSE);
+ if (sink != NULL) {
+ PTRACE(3, "OpalCon\tOpenSourceMediaStream reordering codec for sink stream format " << sink->GetMediaFormat());
+ toFormats.Reorder(sink->GetMediaFormat());
+ }
+ }
OpalMediaFormat sourceFormat, destinationFormat;
if (!OpalTranscoder::SelectFormats(sessionID,
GetMediaFormats(),
- mediaFormats,
+ toFormats,
sourceFormat,
destinationFormat)) {
PTRACE(2, "OpalCon\tOpenSourceMediaStream session " << sessionID
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|