--
You received this message because you are subscribed to the Google Groups "AVBlocks Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to avblocks-suppo...@googlegroups.com.
To post to this group, send email to avblocks...@googlegroups.com.
Visit this group at http://groups.google.com/group/avblocks-support.
For more options, visit https://groups.google.com/groups/opt_out.
if( _mediaBuffer->capacity() >= newDataSize )
{
memcpy(_mediaBuffer->data() + _mediaBuffer->dataSize(), frame->data_, frame->dataSize_ );
_mediaBuffer->setData( 0, newDataSize );
}
if( _mediaBuffer->capacity() >= newDataSize )
{
if (_mediaBuffer->dataOffset() > 0)
{
memmove(_mediaBuffer->start(), _mediaBuffer->data(), _mediaBuffer->dataSize());
_mediaBuffer->setData(0, _mediaBuffer->dataSize());
}
memcpy(_mediaBuffer->data() + _mediaBuffer->dataSize(), frame->data_, frame->dataSize_ );
_mediaBuffer->setData( 0, newDataSize );
}
std::wcout << e->message()
because ErrorInfo::message() can be NULL. You need either to check explicitily for this or use primo::ustring like this:
std::wcout << primo::ustring(e->message())
--
You received this message because you are subscribed to the Google Groups "AVBlocks Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to avblocks-suppo...@googlegroups.com.
To post to this group, send email to avblocks...@googlegroups.com.
Visit this group at http://groups.google.com/group/avblocks-support.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Svilen,thank you for the explanation, I was on vacation last week, but my colleague Bernard implemented your MediaBuffer check and some code to stop it from decoding after an error and that seems to have solved the problem.The reason I didn't think the normalization was necessary was because our code never changes the data offset: we always use MediaBuffer->setData( 0, X ). My assumption was that nothing else would change these offsets, so if we also never change them, we can assume the offset to always be 0 and thus that capacity() - dataSize() = space remaining. I can see that this assumption is very brittle, so I'll check the code for any other occurrences of this assumption and remove them. But just so I understood it correctly: this assumption is incorrect as for example the transcoder->push() will change the data offset?
Other points:e->message() returning null: this seems to have been the general problem causing the crashes, sometimes in combination with us continuing to try to decode after an error, resulting in the end with an error with a null message. We fixed both problems and the first tests have been running a week now wtihtout crashes, which is a very good sign ;)Kind Regards,Sander Borsboom
2014-01-24 Svilen Stoilov via AVBlocks Support <avblocks-support+noreply-APn2wQea-Gg_JJss4RX1wn3_MweO8DJUhiDl08j@googlegroups.com>: