Improved debug to help diagnose MDP failures on Android

This commit is contained in:
Andrew Bettison 2013-10-07 04:43:32 +10:30
parent 6fadb73f1f
commit 8970c4ece7
2 changed files with 4 additions and 3 deletions

View File

@ -150,8 +150,9 @@ int ob_flip(struct overlay_buffer *b)
int _ob_makespace(struct __sourceloc __whence, struct overlay_buffer *b,int bytes)
{
if (b->sizeLimit!=-1 && b->position+bytes>b->sizeLimit) {
if (config.debug.packetformats) WHY("Asked to make space beyond size limit");
if (b->sizeLimit != -1 && b->position + bytes > b->sizeLimit) {
if (config.debug.packetformats)
DEBUGF("asked for space to %u, beyond size limit of %u", b->position + bytes, b->sizeLimit);
return -1;
}

View File

@ -121,7 +121,7 @@ int overlay_frame_append_payload(struct decode_context *context, int encapsulati
}
if (ob_append_bytes(b, ob_ptr(p->payload), ob_position(p->payload))) {
WHY("could not append payload");
WHYF("could not append payload of %u bytes", ob_position(p->payload));
goto cleanup;
}