diff options
-rw-r--r-- | src/demuxers/demux_iff.c | 6 | ||||
-rw-r--r-- | src/libxinevdec/bitplane.c | 50 |
2 files changed, 26 insertions, 30 deletions
diff --git a/src/demuxers/demux_iff.c b/src/demuxers/demux_iff.c index b7f26d6a7..8ed89d591 100644 --- a/src/demuxers/demux_iff.c +++ b/src/demuxers/demux_iff.c @@ -36,7 +36,7 @@ * * ANIM (Animations) * - Animation works fine, without seeking. * - * $Id: demux_iff.c,v 1.11 2004/06/13 21:28:53 miguelfreitas Exp $ + * $Id: demux_iff.c,v 1.12 2004/08/21 21:21:12 manfredtremmel Exp $ */ #ifdef HAVE_CONFIG_H @@ -959,7 +959,7 @@ static int demux_iff_send_chunk(demux_plugin_t *this_gen) { buf->decoder_info[0] = this->video_pts_inc; buf->decoder_info_ptr[0] = this->anhd; if( this->input->get_length (this->input) ) - buf->extra_info->input_normpos = (int)( (double) this->input->get_current_pos (this->input) * + buf->extra_info->input_normpos = (int)( (double) this->input->get_current_pos (this->input) * 65535 / this->input->get_length (this->input) ); buf->pts = this->video_pts; buf->extra_info->input_time = buf->pts / 90; @@ -1292,7 +1292,7 @@ static char *get_identifier (demux_class_t *this_gen) { } static char *get_extensions (demux_class_t *this_gen) { - return "iff svx 8svx 16sv ilbm pic anim"; + return "iff svx 8svx 16sv ilbm ham ham6 ham8 anim anim3 anim5 anim7 anim8"; } static char *get_mimetypes (demux_class_t *this_gen) { diff --git a/src/libxinevdec/bitplane.c b/src/libxinevdec/bitplane.c index f6bb27c2e..203dc300e 100644 --- a/src/libxinevdec/bitplane.c +++ b/src/libxinevdec/bitplane.c @@ -28,7 +28,7 @@ * 8 (long and short) * - untested (found no testfiles) IFF-ANIM OPT 3, 4 and 6 * - * $Id: bitplane.c,v 1.9 2004/03/07 12:48:15 manfredtremmel Exp $ + * $Id: bitplane.c,v 1.10 2004/08/21 21:21:13 manfredtremmel Exp $ */ #include <stdio.h> @@ -1031,19 +1031,17 @@ static void bitplane_dlta_8_long (bitplane_decoder_t *this) { /* Uniq ops */ count = op & 0x7fffffff; /* get count */ while(count--) { - if (data > data_end || rowworkptr > picture_end) { - printf("Fehler decoding (1)\n"); - return; - } - yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); - if( this->is_ham ) { - IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], - rowworkptr, data, bitplainoffeset[palette_index] ); - } else { - IFF_REPLACE_LONG( &this->index_buf[((row_ptr * this->width) + pixel_ptr_bit)], - &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], - &this->yuv_planes.v[yuv_index], this->yuv_palette, - rowworkptr, data, bitplainoffeset[palette_index] ); + if (data <= data_end || rowworkptr <= picture_end) { + yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); + if( this->is_ham ) { + IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], + rowworkptr, data, bitplainoffeset[palette_index] ); + } else { + IFF_REPLACE_LONG( &this->index_buf[((row_ptr * this->width) + pixel_ptr_bit)], + &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], + &this->yuv_planes.v[yuv_index], this->yuv_palette, + rowworkptr, data, bitplainoffeset[palette_index] ); + } } data++; rowworkptr += rowsize_all_planes; @@ -1055,19 +1053,17 @@ static void bitplane_dlta_8_long (bitplane_decoder_t *this) { count = BE_32(data); data++; while(count--) { - if (data > data_end || rowworkptr > picture_end) { - printf("Fehler decoding (2)\n"); - return; - } - yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); - if( this->is_ham ) { - IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], - rowworkptr, data, bitplainoffeset[palette_index] ); - } else { - IFF_REPLACE_LONG( &this->index_buf[yuv_index], - &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], - &this->yuv_planes.v[yuv_index], this->yuv_palette, - rowworkptr, data, bitplainoffeset[palette_index] ); + if (data <= data_end && rowworkptr <= picture_end) { + yuv_index = ((row_ptr * this->width) + pixel_ptr_bit); + if( this->is_ham ) { + IFF_REPLACE_LONG_SIMPLE(&this->index_buf[yuv_index], + rowworkptr, data, bitplainoffeset[palette_index] ); + } else { + IFF_REPLACE_LONG( &this->index_buf[yuv_index], + &this->yuv_planes.y[yuv_index], &this->yuv_planes.u[yuv_index], + &this->yuv_planes.v[yuv_index], this->yuv_palette, + rowworkptr, data, bitplainoffeset[palette_index] ); + } } rowworkptr += rowsize_all_planes; row_ptr++; |