return NULL;
}
+#ifdef DEBUG_SPUDEC
msg_Dbg( p_dec, "total size: 0x%x, RLE offsets: 0x%x 0x%x",
p_sys->i_spu_size,
p_spu_data->pi_offset[0], p_spu_data->pi_offset[1] );
+#endif
Render( p_dec, p_spu, p_spu_data );
free( p_spu_data );
return VLC_EGENERIC;
}
+#ifdef DEBUG_SPUDEC
msg_Dbg( p_dec, "valid subtitle, size: %ix%i, position: %i,%i",
p_spu->i_width, p_spu->i_height, p_spu->i_x, p_spu->i_y );
+#endif
/* Crop if necessary */
if( i_skipped_top || i_skipped_bottom )
p_spu_data->i_y_top_offset = i_skipped_top;
p_spu_data->i_y_bottom_offset = i_skipped_bottom;
+#ifdef DEBUG_SPUDEC
msg_Dbg( p_dec, "cropped to: %ix%i, position: %i,%i",
p_spu->i_width, i_height, p_spu->i_x, i_y );
+#endif
}
/* Handle color if no palette was found */
p_spu_data->pi_yuv[i_shade][2] = 0x80;
}
+#ifdef DEBUG_SPUDEC
msg_Dbg( p_dec, "using custom palette (border %i, inner %i, shade %i)",
i_border, i_inner, i_shade );
+#endif
}
return VLC_SUCCESS;
if( p_sys->i_spu >= p_sys->i_spu_size )
{
/* We have a complete sub */
- msg_Dbg( p_dec, "SPU packets size=%d should be %d",
- p_sys->i_spu, p_sys->i_spu_size );
+ if( p_sys->i_spu > p_sys->i_spu_size )
+ msg_Dbg( p_dec, "SPU packets size=%d should be %d",
+ p_sys->i_spu, p_sys->i_spu_size );
return p_sys->p_block;
}
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+/* #define DEBUG_SPUDEC 1 */
+
struct decoder_sys_t
{
int b_packetizer;