diff --git a/prs/png_wrap.cpp b/prs/png_wrap.cpp index 3ce52d066..e505e32c3 100644 --- a/prs/png_wrap.cpp +++ b/prs/png_wrap.cpp @@ -99,7 +99,7 @@ void PNGWrapper::Read(PRSVideoFrame *frame) { frame->data[0] = new char[w*h*bpp]; frame->w = w; frame->h = h; - frame->pitch = w; + frame->pitch = w*bpp; frame->colorSpace = ColorSpace_RGB32; // Copy data to frame diff --git a/prs/prs_video_frame.cpp b/prs/prs_video_frame.cpp index 7d0518b6b..50fc88e84 100644 --- a/prs/prs_video_frame.cpp +++ b/prs/prs_video_frame.cpp @@ -93,8 +93,8 @@ void PRSVideoFrame::Overlay(PRSVideoFrame *dstFrame,int x,int y,unsigned char al int rowLen = MID(0,w,dstFrame->w - x); // Values - char sc1,sc2,sc3,a,ia; - char dc1,dc2,dc3,da; + unsigned char sc1,sc2,sc3,a,ia; + unsigned char dc1,dc2,dc3,da; // Draw each row for (int j=0;j