[h323plus] OpalVideoFormat never instantiated

Niek Kooij n.kooij at triple-it.nl
Tue Oct 21 10:58:42 EDT 2008



I was looking at the code in h323.cxx function
"H323Connection::MergeCapabilities((unsigned sessionID, const
H323Capability & local, H323Capability * remote)"


   OpalVideoFormat & remoteFormat = (OpalVideoFormat

   const OpalMediaFormat & localFormat = local.GetMediaFormat();


   if (remoteFormat.Merge(localFormat)) {


This looks like it would call the "Merge" function of OpalVideoFormat
but when debugging it uses the Merge function of the base class
OpalMediaFormat. Looking through the code it seems that the class
OpalVideoFormat is actually never instantiated.


I was thinking of fixing this by making "GetWritableMediaFormat" virtual
and reimplementing it in for example "H323VideoCapability" class to
create a real OpalVideoFormat instance.


I was wondering if anybody knows this code better and could tell if this
is a good idea...


Greetings Niek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.packetizer.com/pipermail/h323plus/attachments/20081021/5aac50bf/attachment-0003.html>

More information about the h323plus mailing list