[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp |
Date: |
Wed, 11 Apr 2007 14:54:26 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 07/04/11 14:54:26
Modified files:
. : ChangeLog
backend : render_handler_agg.cpp
Log message:
Stop relying on bounds passed from
video definition for image buffer size (since we don't yet do proper
scaling, that is a bad idea); fixes bug #19511. Also, cut off the
video image if it extends beyond the width of our buffer.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2847&r2=1.2848
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/render_handler_agg.cpp?cvsroot=gnash&r1=1.68&r2=1.69
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2847
retrieving revision 1.2848
diff -u -b -r1.2847 -r1.2848
--- ChangeLog 11 Apr 2007 14:20:20 -0000 1.2847
+++ ChangeLog 11 Apr 2007 14:54:25 -0000 1.2848
@@ -43,6 +43,10 @@
This adds NULL-termination, which is also expected by FFMPEG.
* server/asobj/NetStreamFfmpeg.cpp: Initialize certain members to safe
defaults so they will not be read in their uninitialised states.
+ * backend/render_handler_agg.cpp: Stop relying on bounds passed from
+ video definition for image buffer size (since we don't yet do proper
+ scaling, that is a bad idea); fixes bug #19511. Also, cut off the
+ video image if it extends beyond the width of our buffer.
2007-04-11 Sandro Santilli <address@hidden>
Index: backend/render_handler_agg.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/render_handler_agg.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- backend/render_handler_agg.cpp 7 Mar 2007 11:03:42 -0000 1.68
+++ backend/render_handler_agg.cpp 11 Apr 2007 14:54:26 -0000 1.69
@@ -16,7 +16,7 @@
-/* $Id: render_handler_agg.cpp,v 1.68 2007/03/07 11:03:42 udog Exp $ */
+/* $Id: render_handler_agg.cpp,v 1.69 2007/04/11 14:54:26 bjacques Exp $ */
// Original version by Udo Giacomozzi and Hannes Mayr,
// INDUNET GmbH (www.indunet.it)
@@ -454,13 +454,17 @@
int bytes_per_pixel = 3;
image::rgb* frame = static_cast<image::rgb*>(baseframe);
- // Note that image::rgb* allocates a buffer with extra padding
- // for performance purposes. Therefore, we need to use the
- // actual image size so we don't copy padding bytes to the Agg
- // buffer.
- int frame_width = (int)TWIPS_TO_PIXELS(bounds->width()) *
bytes_per_pixel;
+ unsigned int frame_width = frame->m_width * bytes_per_pixel;
+
+ if (frame_width + xpos * bytes_per_pixel > m_rbuf.width() *
bytes_per_pixel) {
+ // the movie was placed too far to the right. let's cut it off at
+ // the far right corner. (This is also how "that other player"
+ // handles it, I'm told.)
+ frame_width = (m_rbuf.width() * bytes_per_pixel - xpos *
bytes_per_pixel);
+ }
+
unsigned char* rgbbuf_ptr = frame->m_data;
- unsigned char* rgbbuf_end = rgbbuf_ptr + frame_width *
+ unsigned char* rgbbuf_end = rgbbuf_ptr + frame->m_pitch *
frame->m_height;
unsigned char* aggbuf_ptr = memaddr;
@@ -471,7 +475,7 @@
// Move xpos pixels to the right.
aggbuf_ptr += xpos * bytes_per_pixel;
- while(rgbbuf_ptr <= rgbbuf_end && aggbuf_ptr <= aggbuf_end) {
+ while(rgbbuf_ptr < rgbbuf_end && aggbuf_ptr < aggbuf_end) {
memcpy(aggbuf_ptr, rgbbuf_ptr, frame_width);
aggbuf_ptr += m_rbuf.stride();
rgbbuf_ptr += frame->m_pitch;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp,
Bastiaan Jacques <=