summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/qtrle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/qtrle.c')
-rw-r--r--src/libffmpeg/libavcodec/qtrle.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libffmpeg/libavcodec/qtrle.c b/src/libffmpeg/libavcodec/qtrle.c
index 0d79c5c9e..0db003146 100644
--- a/src/libffmpeg/libavcodec/qtrle.c
+++ b/src/libffmpeg/libavcodec/qtrle.c
@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -251,7 +251,7 @@ static void qtrle_decode_16bpp(QtrleContext *s)
int header;
int start_line;
int lines_to_change;
- signed char rle_code;
+ int rle_code;
int row_ptr, pixel_ptr;
int row_inc = s->frame.linesize[0];
unsigned short rgb16;
@@ -329,7 +329,7 @@ static void qtrle_decode_24bpp(QtrleContext *s)
int header;
int start_line;
int lines_to_change;
- signed char rle_code;
+ int rle_code;
int row_ptr, pixel_ptr;
int row_inc = s->frame.linesize[0];
unsigned char r, g, b;
@@ -408,10 +408,10 @@ static void qtrle_decode_32bpp(QtrleContext *s)
int header;
int start_line;
int lines_to_change;
- signed char rle_code;
+ int rle_code;
int row_ptr, pixel_ptr;
int row_inc = s->frame.linesize[0];
- unsigned char r, g, b;
+ unsigned char a, r, g, b;
unsigned int argb;
unsigned char *rgb = s->frame.data[0];
int pixel_limit = s->frame.linesize[0] * s->avctx->height;
@@ -455,11 +455,11 @@ static void qtrle_decode_32bpp(QtrleContext *s)
/* decode the run length code */
rle_code = -rle_code;
CHECK_STREAM_PTR(4);
- stream_ptr++; /* skip the alpha (?) byte */
+ a = s->buf[stream_ptr++];
r = s->buf[stream_ptr++];
g = s->buf[stream_ptr++];
b = s->buf[stream_ptr++];
- argb = (r << 16) | (g << 8) | (b << 0);
+ argb = (a << 24) | (r << 16) | (g << 8) | (b << 0);
CHECK_PIXEL_PTR(rle_code * 4);
@@ -473,11 +473,11 @@ static void qtrle_decode_32bpp(QtrleContext *s)
/* copy pixels directly to output */
while (rle_code--) {
- stream_ptr++; /* skip the alpha (?) byte */
+ a = s->buf[stream_ptr++];
r = s->buf[stream_ptr++];
g = s->buf[stream_ptr++];
b = s->buf[stream_ptr++];
- argb = (r << 16) | (g << 8) | (b << 0);
+ argb = (a << 24) | (r << 16) | (g << 8) | (b << 0);
*(unsigned int *)(&rgb[pixel_ptr]) = argb;
pixel_ptr += 4;
}