diff options
Diffstat (limited to 'src/libxinevdec/msrle.c')
-rw-r--r-- | src/libxinevdec/msrle.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c index 982d689dc..0d748c580 100644 --- a/src/libxinevdec/msrle.c +++ b/src/libxinevdec/msrle.c @@ -21,7 +21,7 @@ * For more information on the MS RLE format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: msrle.c,v 1.3 2002/07/20 04:24:59 tmmm Exp $ + * $Id: msrle.c,v 1.4 2002/08/28 03:37:17 tmmm Exp $ */ #include <stdio.h> @@ -78,9 +78,9 @@ void decode_msrle8(msrle_decoder_t *this) { unsigned char extra_byte; unsigned char stream_byte; int pixel_ptr = 0; - int row_dec = this->yuv_planes.row_stride; + int row_dec = this->yuv_planes.row_width; int row_ptr = (this->height - 1) * row_dec; - int frame_size = this->yuv_planes.row_stride * this->height; + int frame_size = this->yuv_planes.row_width * this->height; unsigned char y, u, v; while (row_ptr >= 0) { @@ -90,22 +90,13 @@ void decode_msrle8(msrle_decoder_t *this) { /* fetch the next byte to see how to handle escape code */ FETCH_NEXT_STREAM_BYTE(); if (stream_byte == 0) { - /* take care of the extra 2 pixels on the C lines */ - FINISH_LINE(this->yuv_planes, row_ptr); - /* line is done, goto the next one */ row_ptr -= row_dec; pixel_ptr = 0; } else if (stream_byte == 1) { - /* take care of the extra 2 pixels on the C lines */ - FINISH_LINE(this->yuv_planes, row_ptr); - /* decode is done */ return; } else if (stream_byte == 2) { - /* take care of the extra 2 pixels on the C lines */ - FINISH_LINE(this->yuv_planes, row_ptr); - /* reposition frame decode coordinates */ FETCH_NEXT_STREAM_BYTE(); pixel_ptr += stream_byte; |