[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 18 Nov 2008 21:08:52 +0100
Rob, while working on rtmpget I found a bug
When the element is not of type object,
a shared_ptr is constructed with 'this'
for passing it to AMF::encodeElement.
Now, the problem is that 'this' might not
be refcounted yet. In our case it is indeed
a stack-allocated Element (stack allocated in
rtmpget.cpp). For this reason, when the scoped_ptr
is constructed it sets refoucnt=1 and when it's
destructed it kills 'this', trying to delete a stack
Now, avoiding any redesign attempt, is there any
reason for AMF::encodeElement to take a shared_ptr<Element>
rather then a const Element& ?
All the encoder does is serializign the Element, and
keeps no state between calls, right ?
() ASCII Ribbon Campaign
/\ Keep it simple!
- [Gnash-dev] AMF::encodeObject,encodeElement,