Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Tizen] Fix: The screen displayed abnormally when playing
Browse files Browse the repository at this point in the history
some size of html5 mp4 videos on Tizen IVI.

Bug report: https://crosswalk-project.org/jira/browse/XWALK-1781
  • Loading branch information
zhang-qing committed Jun 10, 2014
1 parent 881367b commit e9f3668
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ bool VaapiVideoDecodeAccelerator::TFPPicture::Upload(VASurfaceID surface) {
gfx::ScopedTextureBinder texture_binder(GL_TEXTURE_2D, texture_id_);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

unsigned int al = 4 * size_.width(); // Alignment length.
if(al != va_image_.pitches[0]) { // Check RGBA data alignment.
unsigned char* bhandle = (unsigned char* )buffer;
for(int i = 0; i < size_.height(); i++) { // Realign filled video frame.
memcpy(bhandle + (i * al), bhandle + (i * (va_image_.pitches[0])), al);
}
}
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size_.width(), size_.height(),
0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);

Expand Down

0 comments on commit e9f3668

Please sign in to comment.