+ msg_Warn( p_dec, "unknown SPU command 0x%.2x", i_command );
+ if( i_index + 1 < i_next_seq )
+ {
+ /* There is at least one other command sequence */
+ if( p_sys->buffer[i_next_seq - 1] == SPU_CMD_END )
+ {
+ /* This is consistent. Skip to that command sequence. */
+ i_index = i_next_seq;
+ }
+ else
+ {
+ /* There were other commands. */
+ msg_Warn( p_dec, "cannot recover, dropping subtitle" );
+ return VLC_EGENERIC;
+ }
+ }
+ else
+ {
+ /* We were in the last command sequence. Stop parsing by
+ * pretending we met an SPU_CMD_END command. */
+ i_command = SPU_CMD_END;
+ i_index++;
+ }