Hi,
I found a problem about improperly getting the end of file error while
loading a jpeg file into memory buffer.
The problem appeared when I tried to take less than buffer length into
memory buffer.
I attached the patch,
Thanks,
Vasile FLOROIU
diff -b -u -r1.10 idirectfbdatabuffer_memory.c
--- src/media/idirectfbdatabuffer_memory.c 9 Oct 2009 21:05:51 -0000 1.10
+++ src/media/idirectfbdatabuffer_memory.c 4 May 2010 13:52:13 -0000
@@ -135,7 +135,7 @@
{
DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Memory)
- if (data->pos + length > data->length)
+ if (data->pos >= data->length)
return DFB_EOF;
return DFB_OK;
@@ -149,7 +149,7 @@
{
DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Memory)
- if (data->pos + length > data->length)
+ if (data->pos >= data->length)
return DFB_EOF;
return DFB_OK;
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev